From 33741210b3f5feebef81982cdcdc941b665a97df Mon Sep 17 00:00:00 2001 From: hartvig Date: Tue, 22 Feb 2011 09:11:45 -0100 Subject: [PATCH] Fix to macro container bug. Thank you to the 'mysterious patcher'. Work items: 29874 --- .../macrocontainer/MacroEditor.cs | 10 +- umbraco/presentation/web.config | 414 +++++++++--------- 2 files changed, 214 insertions(+), 210 deletions(-) diff --git a/components/editorControls/macrocontainer/MacroEditor.cs b/components/editorControls/macrocontainer/MacroEditor.cs index a469925b80..b5c5ffb4bd 100644 --- a/components/editorControls/macrocontainer/MacroEditor.cs +++ b/components/editorControls/macrocontainer/MacroEditor.cs @@ -63,15 +63,11 @@ namespace umbraco.editorControls.macrocontainer // with _macroSelectDropdown.Items.Add(new ListItem(GetMacroNameFromAlias(item), item)); private string GetMacroNameFromAlias(string alias) { - umbraco.DataLayer.IRecordsReader dr = umbraco.BusinessLogic.Application.SqlHelper.ExecuteReader("select macroName from cmsMacro where macroAlias = @alias", - umbraco.BusinessLogic.Application.SqlHelper.CreateParameter("@alias", alias)); - - if (dr.Read()) - return dr.GetString("macroName"); - else - return string.Empty; + var macro = umbraco.macro.ReturnFromAlias(alias); + return macro == null ? string.Empty : macro.Name; } + void _delete_Click(object sender, EventArgs e) { _macroSelectDropdown.SelectedIndex = 0; diff --git a/umbraco/presentation/web.config b/umbraco/presentation/web.config index 924968745f..b805ee0b5c 100644 --- a/umbraco/presentation/web.config +++ b/umbraco/presentation/web.config @@ -1,16 +1,15 @@ - + - -
- - - - - -
- - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + \ No newline at end of file