diff --git a/src/Umbraco.Core/Configuration/GlobalSettings.cs b/src/Umbraco.Core/Configuration/GlobalSettings.cs index 2daa6466d6..e8f9c3ca94 100644 --- a/src/Umbraco.Core/Configuration/GlobalSettings.cs +++ b/src/Umbraco.Core/Configuration/GlobalSettings.cs @@ -116,13 +116,16 @@ namespace Umbraco.Core.Configuration /// Gets the name of the content XML file. /// /// The content XML. + /// + /// Defaults to ~/App_Data/umbraco.config + /// public static string ContentXmlFile { get { return ConfigurationManager.AppSettings.ContainsKey("umbracoContentXML") ? ConfigurationManager.AppSettings["umbracoContentXML"] - : string.Empty; + : "~/App_Data/umbraco.config"; } } @@ -136,7 +139,7 @@ namespace Umbraco.Core.Configuration { return ConfigurationManager.AppSettings.ContainsKey("umbracoStorageDirectory") ? ConfigurationManager.AppSettings["umbracoStorageDirectory"] - : string.Empty; + : "~/App_Data"; } } @@ -437,13 +440,24 @@ namespace Umbraco.Core.Configuration /// Returns a string value to determine if umbraco should disbable xslt extensions /// /// "true" if version xslt extensions are disabled, otherwise, "false" + [Obsolete("This is no longer used and will be removed from the codebase in future releases")] public static string DisableXsltExtensions { get { return ConfigurationManager.AppSettings.ContainsKey("umbracoDisableXsltExtensions") ? ConfigurationManager.AppSettings["umbracoDisableXsltExtensions"] - : string.Empty; + : "false"; + } + } + + internal static bool ContentCacheXmlStoredInCodeGen + { + get + { + //defaults to false + return ConfigurationManager.AppSettings.ContainsKey("umbracoContentXMLUseLocalTemp") + && bool.Parse(ConfigurationManager.AppSettings["umbracoContentXMLUseLocalTemp"]); //default to false } } @@ -451,14 +465,10 @@ namespace Umbraco.Core.Configuration /// Returns a string value to determine if umbraco should use Xhtml editing mode in the wysiwyg editor /// /// "true" if Xhtml mode is enable, otherwise, "false" + [Obsolete("This is no longer used and will be removed from the codebase in future releases")] public static string EditXhtmlMode { - get - { - return ConfigurationManager.AppSettings.ContainsKey("umbracoEditXhtmlMode") - ? ConfigurationManager.AppSettings["umbracoEditXhtmlMode"] - : string.Empty; - } + get { return "true"; } } /// @@ -483,9 +493,10 @@ namespace Umbraco.Core.Configuration { get { + //the default will be 'profiler' return ConfigurationManager.AppSettings.ContainsKey("umbracoProfileUrl") ? ConfigurationManager.AppSettings["umbracoProfileUrl"] - : string.Empty; + : "profiler"; } } diff --git a/src/Umbraco.Core/IO/SystemFiles.cs b/src/Umbraco.Core/IO/SystemFiles.cs index f8a7a368e5..1436986ed6 100644 --- a/src/Umbraco.Core/IO/SystemFiles.cs +++ b/src/Umbraco.Core/IO/SystemFiles.cs @@ -5,6 +5,7 @@ using System.IO; using System.Linq; using System.Text; using System.Web; +using Umbraco.Core.Configuration; namespace Umbraco.Core.IO { @@ -96,7 +97,7 @@ namespace Umbraco.Core.IO { get { - if (ContentCacheXmlIsEphemeral && SystemUtilities.GetCurrentTrustLevel() == AspNetHostingPermissionLevel.Unrestricted) + if (GlobalSettings.ContentCacheXmlStoredInCodeGen && SystemUtilities.GetCurrentTrustLevel() == AspNetHostingPermissionLevel.Unrestricted) { return Path.Combine(HttpRuntime.CodegenDir, @"UmbracoData\umbraco.config"); } @@ -104,19 +105,10 @@ namespace Umbraco.Core.IO } } - internal static bool ContentCacheXmlIsEphemeral + [Obsolete("Use GlobalSettings.ContentCacheXmlStoredInCodeGen instead")] + internal static bool ContentCacheXmlStoredInCodeGen { - get - { - bool returnValue = false; - string configSetting = ConfigurationManager.AppSettings["umbracoContentXMLUseLocalTemp"]; - - if (!string.IsNullOrEmpty(configSetting)) - if(bool.TryParse(configSetting, out returnValue)) - return returnValue; - - return false; - } + get { return GlobalSettings.ContentCacheXmlStoredInCodeGen; } } } } diff --git a/src/Umbraco.Tests/App.config b/src/Umbraco.Tests/App.config index 57b918dd06..9fe4b63ca8 100644 --- a/src/Umbraco.Tests/App.config +++ b/src/Umbraco.Tests/App.config @@ -8,18 +8,11 @@ - - - - - - - diff --git a/src/Umbraco.Web.UI/web.Template.config b/src/Umbraco.Web.UI/web.Template.config index 296396dc39..24ccf4b587 100644 --- a/src/Umbraco.Web.UI/web.Template.config +++ b/src/Umbraco.Web.UI/web.Template.config @@ -27,27 +27,21 @@ + - - - - - - - - - - diff --git a/src/Umbraco.Web/Routing/ContentFinderByProfile.cs b/src/Umbraco.Web/Routing/ContentFinderByProfile.cs index 4dfe8a1da6..4a9034460a 100644 --- a/src/Umbraco.Web/Routing/ContentFinderByProfile.cs +++ b/src/Umbraco.Web/Routing/ContentFinderByProfile.cs @@ -1,6 +1,6 @@ +using Umbraco.Core.Configuration; using Umbraco.Core.Logging; using Umbraco.Core.Models; -using umbraco; using Umbraco.Core; namespace Umbraco.Web.Routing diff --git a/src/umbraco.businesslogic/GlobalSettings.cs b/src/umbraco.businesslogic/GlobalSettings.cs index 1ba730ecfb..0c8f598ec1 100644 --- a/src/umbraco.businesslogic/GlobalSettings.cs +++ b/src/umbraco.businesslogic/GlobalSettings.cs @@ -224,6 +224,7 @@ namespace umbraco /// Returns a string value to determine if umbraco should disbable xslt extensions /// /// "true" if version xslt extensions are disabled, otherwise, "false" + [Obsolete("This is no longer used and will be removed from the codebase in future releases")] public static string DisableXsltExtensions { get { return Umbraco.Core.Configuration.GlobalSettings.DisableXsltExtensions; } @@ -233,6 +234,7 @@ namespace umbraco /// Returns a string value to determine if umbraco should use Xhtml editing mode in the wysiwyg editor /// /// "true" if Xhtml mode is enable, otherwise, "false" + [Obsolete("This is no longer used and will be removed from the codebase in future releases")] public static string EditXhtmlMode { get { return Umbraco.Core.Configuration.GlobalSettings.EditXhtmlMode; } diff --git a/src/umbraco.businesslogic/IO/SystemFiles.cs b/src/umbraco.businesslogic/IO/SystemFiles.cs index f2915d11a3..5609abd638 100644 --- a/src/umbraco.businesslogic/IO/SystemFiles.cs +++ b/src/umbraco.businesslogic/IO/SystemFiles.cs @@ -71,7 +71,7 @@ namespace umbraco.IO public static bool ContentCacheXmlIsEphemeral { - get { return Umbraco.Core.IO.SystemFiles.ContentCacheXmlIsEphemeral; } + get { return Umbraco.Core.IO.SystemFiles.ContentCacheXmlStoredInCodeGen; } } } }