From a03f5420fafdf4d7f754b36574bb0ee8b4025ae6 Mon Sep 17 00:00:00 2001 From: Stephan Date: Fri, 8 Feb 2013 07:36:35 -0100 Subject: [PATCH] U4-1441 - change trySkipIisCustomError config key --- .../Configuration/UmbracoSettings.cs | 31 ++++++++++++++++--- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 5 ++- .../config/umbracoSettings.Release.config | 16 ++++++---- .../config/umbracoSettings.config | 16 ++++++---- 4 files changed, 50 insertions(+), 18 deletions(-) diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings.cs b/src/Umbraco.Core/Configuration/UmbracoSettings.cs index d5dfa7b641..055353f4b5 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings.cs @@ -157,11 +157,32 @@ namespace Umbraco.Core.Configuration { EnsureSettingsDocument(); + string attrName = null; + var pos = key.IndexOf('@'); + if (pos > 0) + { + attrName = key.Substring(pos + 1); + key = key.Substring(0, pos - 1); + } + var node = UmbracoSettingsXmlDoc.DocumentElement.SelectSingleNode(key); - if (node == null || node.FirstChild == null || node.FirstChild.Value == null) - return string.Empty; - return node.FirstChild.Value; - } + if (node == null) + return string.Empty; + + if (pos < 0) + { + if (node.FirstChild == null || node.FirstChild.Value == null) + return string.Empty; + return node.FirstChild.Value; + } + else + { + var attr = node.Attributes[attrName]; + if (attr == null) + return string.Empty; + return attr.Value; + } + } /// /// Gets a value indicating whether the media library will create new directories in the /media directory. @@ -647,7 +668,7 @@ namespace Umbraco.Core.Configuration get { // default: false - return GetKeyWithOverride("/settings/TrySkipIisCustomErrors", false, _trySkipIisCustomErrors); + return GetKeyWithOverride("/settings/web.routing/@trySkipIisCustomErrors", false, _trySkipIisCustomErrors); } internal set { diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 13de47d66e..3b00c33b47 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -453,6 +453,7 @@ umbracoSettings.config + Designer trees.config @@ -2358,7 +2359,9 @@ Designer - + + Designer + diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config index 1cabd94703..d3eb0e2477 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config @@ -242,12 +242,16 @@ - false + + diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config index 10764d0526..1fafe2f61b 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.config @@ -193,12 +193,16 @@ - false + + \ No newline at end of file