Major refactor of macro.cs, fixing huge memory leak in caching of xsltExtensions. Work items: 30616, 30522

This commit is contained in:
hartvig
2011-11-25 14:03:09 -01:00
parent d6341e73b6
commit aec48c7df9
15 changed files with 389 additions and 525 deletions

View File

@@ -472,7 +472,7 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
// Insert macro contents here...
macro m;
if (helper.FindAttribute(attributes, "macroID") != "")
m = new macro(int.Parse(helper.FindAttribute(attributes, "macroID")));
m = macro.GetMacro(int.Parse(helper.FindAttribute(attributes, "macroID")));
else
{
// legacy: Check if the macroAlias is typed in lowercasing
@@ -485,7 +485,7 @@ namespace umbraco.editorControls.tinyMCE3.webcontrol
}
if (macroAlias != "")
m = new macro(Macro.GetByAlias(macroAlias).Id);
m = macro.GetMacro(macroAlias);
else
throw new ArgumentException("umbraco is unable to identify the macro. No id or macroalias was provided for the macro in the macro tag.", tag.Groups[1].Value);
}