Fixes another issue with the installer and detecting macros

This commit is contained in:
Shannon
2013-11-04 18:27:08 +11:00
parent 365eb6497f
commit bc0da04470

View File

@@ -622,13 +622,12 @@ namespace umbraco.cms.businesslogic.packager
var alias = n.SelectSingleNode("alias").InnerText;
if (!string.IsNullOrEmpty(alias))
{
try
var m = ApplicationContext.Current.Services.MacroService.GetByAlias(alias);
if (m != null)
{
var m = new Macro(alias);
this.ContainsMacroConflict = true;
this._conflictingMacroAliases.Add(m.Name, alias);
}
catch (IndexOutOfRangeException) { } //thrown when the alias doesn't exist in the DB, ie - macro not there
ContainsMacroConflict = true;
_conflictingMacroAliases.Add(m.Name, alias);
}
}
}