diff --git a/src/Umbraco.Web.UI/umbraco/dialogs/editMacro.aspx b/src/Umbraco.Web.UI/umbraco/dialogs/editMacro.aspx
index 87c146c9c1..696fa1175e 100644
--- a/src/Umbraco.Web.UI/umbraco/dialogs/editMacro.aspx
+++ b/src/Umbraco.Web.UI/umbraco/dialogs/editMacro.aspx
@@ -13,7 +13,7 @@
(function($) {
$(document).ready(function () {
Umbraco.Dialogs.EditMacro.getInstance().init({
- useAspNetMasterPages: <%=umbraco.UmbracoSettings.UseAspNetMasterPages.ToString().ToLower() %>,
+ useAspNetMasterPages: <%=umbraco.UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages.ToString().ToLower() %>,
codeEditorElementId: "<%=Request.GetItemAsString("objectId")%>",
renderingEngine: "<%=Request.GetItemAsString("renderingEngine", "Mvc")%>",
macroAlias: '<%= _macroAlias %>'
diff --git a/src/Umbraco.Web.UI/umbraco/settings/editTemplate.aspx b/src/Umbraco.Web.UI/umbraco/settings/editTemplate.aspx
index 85e5797d35..e500b23f5d 100644
--- a/src/Umbraco.Web.UI/umbraco/settings/editTemplate.aspx
+++ b/src/Umbraco.Web.UI/umbraco/settings/editTemplate.aspx
@@ -23,7 +23,7 @@
restServiceLocation: "<%= Url.GetSaveFileServicePath() %>",
umbracoPath: '<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>',
editorClientId: '<%= editorSource.ClientID %>',
- useMasterPages: <%=umbraco.UmbracoSettings.UseAspNetMasterPages.ToString().ToLower()%>,
+ useMasterPages: <%=umbraco.UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages.ToString().ToLower()%>,
templateId: <%= Request.QueryString["templateID"] %>,
masterTemplateId: jQuery('#<%= MasterTemplate.ClientID %>').val(),
masterPageDropDown: $("#<%= MasterTemplate.ClientID %>"),
diff --git a/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs b/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs
index 274705439e..54087db3a1 100644
--- a/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs
+++ b/src/Umbraco.Web/Cache/DistributedCacheExtensions.cs
@@ -526,7 +526,7 @@ namespace Umbraco.Web.Cache
public static void ClearXsltCacheOnCurrentServer(this DistributedCache dc)
{
- if (UmbracoSettings.UmbracoLibraryCacheDuration > 0)
+ if (UmbracoConfiguration.Current.UmbracoSettings.Content.UmbracoLibraryCacheDuration > 0)
{
ApplicationContext.Current.ApplicationCache.ClearCacheObjectTypes("MS.Internal.Xml.XPath.XPathSelectionIterator");
}
diff --git a/src/Umbraco.Web/LegacyScheduledTasks.cs b/src/Umbraco.Web/LegacyScheduledTasks.cs
index 8b4ccce8e9..edfcc5ec54 100644
--- a/src/Umbraco.Web/LegacyScheduledTasks.cs
+++ b/src/Umbraco.Web/LegacyScheduledTasks.cs
@@ -54,8 +54,8 @@ namespace Umbraco.Web
int interval = 24 * 60 * 60; //24 hours
try
{
- if (global::umbraco.UmbracoSettings.CleaningMiliseconds > -1)
- interval = global::umbraco.UmbracoSettings.CleaningMiliseconds;
+ if (global::umbraco.UmbracoConfiguration.Current.UmbracoSettings.Logging.CleaningMiliseconds > -1)
+ interval = global::umbraco.UmbracoConfiguration.Current.UmbracoSettings.Logging.CleaningMiliseconds;
}
catch (Exception e)
{
@@ -69,8 +69,8 @@ namespace Umbraco.Web
int maximumAge = 24 * 60 * 60;
try
{
- if (global::umbraco.UmbracoSettings.MaxLogAge > -1)
- maximumAge = global::umbraco.UmbracoSettings.MaxLogAge;
+ if (global::umbraco.UmbracoConfiguration.Current.UmbracoSettings.Logging.MaxLogAge > -1)
+ maximumAge = global::umbraco.UmbracoConfiguration.Current.UmbracoSettings.Logging.MaxLogAge;
}
catch (Exception e)
{
diff --git a/src/Umbraco.Web/Media/ImageUrlProviders/ImageUrlProvider.cs b/src/Umbraco.Web/Media/ImageUrlProviders/ImageUrlProvider.cs
index 780648460f..c8606e8897 100644
--- a/src/Umbraco.Web/Media/ImageUrlProviders/ImageUrlProvider.cs
+++ b/src/Umbraco.Web/Media/ImageUrlProviders/ImageUrlProvider.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Xml.XPath;
+using Umbraco.Core.Configuration;
using Umbraco.Core.Media;
using umbraco;
using Umbraco.Core;
@@ -77,7 +78,7 @@ namespace Umbraco.Web.Media.ImageUrlProviders
private static string GetProperty(XPathNodeIterator nodeIterator, string fileProp)
{
- var xpath = UmbracoSettings.UseLegacyXmlSchema
+ var xpath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema
? string.Format(".//data[@alias = '{0}']", fileProp)
: string.Format(".//{0}", fileProp);
diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs
index df143ed8e3..613abf8dfc 100644
--- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs
+++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs
@@ -5,6 +5,7 @@ using System.Runtime.CompilerServices;
using System.Text;
using System.Xml;
using System.Xml.XPath;
+using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core;
using Umbraco.Core.Models;
@@ -14,6 +15,7 @@ using umbraco;
using System.Linq;
using umbraco.BusinessLogic;
using umbraco.presentation.preview;
+using GlobalSettings = umbraco.GlobalSettings;
namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
@@ -224,7 +226,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
// that switch schemas fail - so cache and refresh when needed,
// ie never when running the actual site
- var version = UmbracoSettings.UseLegacyXmlSchema ? 0 : 1;
+ var version = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? 0 : 1;
if (_xPathStringsValue == null || _xPathStringsValue.Version != version)
_xPathStringsValue = new XPathStringsDefinition(version);
return _xPathStringsValue;
diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs
index 43f3f5cdc9..fff4528a2c 100644
--- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs
+++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs
@@ -9,6 +9,7 @@ using Examine.LuceneEngine.SearchCriteria;
using Examine.Providers;
using Lucene.Net.Documents;
using Umbraco.Core;
+using Umbraco.Core.Configuration;
using Umbraco.Core.Dynamics;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
@@ -252,7 +253,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
if (xpath == null) throw new ArgumentNullException("xpath");
var values = new Dictionary
{{"nodeName", xpath.GetAttribute("nodeName", "")}};
- if (!UmbracoSettings.UseLegacyXmlSchema)
+ if (!UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema)
{
values.Add("nodeTypeAlias", xpath.Name);
}
diff --git a/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs b/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs
index 8779ce0100..23b12fe614 100644
--- a/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs
+++ b/src/Umbraco.Web/Routing/ContentFinderByUrlAlias.cs
@@ -1,6 +1,7 @@
using System;
using System.Text;
using System.Linq;
+using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core;
@@ -123,7 +124,7 @@ namespace Umbraco.Web.Routing
// that switch schemas fail - so cache and refresh when needed,
// ie never when running the actual site
- var version = global::umbraco.UmbracoSettings.UseLegacyXmlSchema ? 0 : 1;
+ var version = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? 0 : 1;
if (_xPathStringsValue == null || _xPathStringsValue.Version != version)
_xPathStringsValue = new XPathStringsDefinition(version);
return _xPathStringsValue;
diff --git a/src/Umbraco.Web/umbraco.presentation/NotFoundHandlers.cs b/src/Umbraco.Web/umbraco.presentation/NotFoundHandlers.cs
index 0ff9fb147b..56c15cffc6 100644
--- a/src/Umbraco.Web/umbraco.presentation/NotFoundHandlers.cs
+++ b/src/Umbraco.Web/umbraco.presentation/NotFoundHandlers.cs
@@ -4,6 +4,7 @@ using System.Diagnostics;
using System.Reflection;
using System.Web;
using System.Xml;
+using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using umbraco.BusinessLogic;
using umbraco.cms.businesslogic.member;
@@ -142,7 +143,7 @@ namespace umbraco {
string currentDomain = System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"];
string prefixXPath = "";
if (Domain.Exists(currentDomain)) {
- string xpathDomain = UmbracoSettings.UseLegacyXmlSchema ? "//node [@id = '{0}']" : "//* [@isDoc and @id = '{0}']";
+ string xpathDomain = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "//node [@id = '{0}']" : "//* [@isDoc and @id = '{0}']";
prefixXPath = string.Format(xpathDomain, Domain.GetRootFromDomain(currentDomain));
_cacheUrl = false;
}
@@ -150,7 +151,7 @@ namespace umbraco {
// the reason we have almost two identical queries in the xpath is to support scenarios where the user have
// entered "/my-url" instead of "my-url" (ie. added a beginning slash)
- string xpath = UmbracoSettings.UseLegacyXmlSchema ? "//node [contains(concat(',',translate(data [@alias = 'umbracoUrlAlias'], ' ', ''),','),',{0},') or contains(concat(',',translate(data [@alias = 'umbracoUrlAlias'], ' ', ''),','),',{1},')]" :
+ string xpath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "//node [contains(concat(',',translate(data [@alias = 'umbracoUrlAlias'], ' ', ''),','),',{0},') or contains(concat(',',translate(data [@alias = 'umbracoUrlAlias'], ' ', ''),','),',{1},')]" :
"//* [@isDoc and (contains(concat(',',translate(umbracoUrlAlias, ' ', ''),','),',{0},') or contains(concat(',',translate(umbracoUrlAlias, ' ', ''),','),',{1},'))]";
string query = String.Format(prefixXPath + xpath, tempUrl, "/" + tempUrl);
XmlNode redir =
diff --git a/src/Umbraco.Web/umbraco.presentation/UmbracoContext.cs b/src/Umbraco.Web/umbraco.presentation/UmbracoContext.cs
index b065c6829c..e4570e54ee 100644
--- a/src/Umbraco.Web/umbraco.presentation/UmbracoContext.cs
+++ b/src/Umbraco.Web/umbraco.presentation/UmbracoContext.cs
@@ -1,5 +1,6 @@
using System;
using System.Web;
+using Umbraco.Core.Configuration;
using umbraco.presentation.LiveEditing;
using umbraco.BasePages;
using umbraco.cms.businesslogic.web;
@@ -111,7 +112,7 @@ namespace umbraco.presentation
{
get
{
- return !UmbracoSettings.UseLegacyXmlSchema;
+ return !UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema;
}
}
diff --git a/src/Umbraco.Web/umbraco.presentation/content.cs b/src/Umbraco.Web/umbraco.presentation/content.cs
index 9270e57cc0..0cec82150c 100644
--- a/src/Umbraco.Web/umbraco.presentation/content.cs
+++ b/src/Umbraco.Web/umbraco.presentation/content.cs
@@ -10,6 +10,7 @@ using System.Xml;
using System.Xml.XPath;
using Umbraco.Core;
using Umbraco.Core.Cache;
+using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using umbraco.BusinessLogic;
@@ -142,7 +143,7 @@ namespace umbraco
{
_xmlContent = value;
- if (!UmbracoSettings.isXmlContentCacheDisabled && UmbracoSettings.continouslyUpdateXmlDiskCache)
+ if (!UmbracoConfiguration.Current.UmbracoSettings.Content.XmlCacheEnabled && UmbracoConfiguration.Current.UmbracoSettings.Content.ContinouslyUpdateXmlDiskCache)
QueueXmlForPersistence();
else
// Clear cache...
@@ -159,7 +160,7 @@ namespace umbraco
///
private void CheckDiskCacheForUpdate()
{
- if (UmbracoSettings.isXmlContentCacheDisabled)
+ if (UmbracoConfiguration.Current.UmbracoSettings.Content.XmlCacheEnabled)
return;
lock (TimestampSyncLock)
@@ -207,7 +208,7 @@ namespace umbraco
// Only save new XML cache to disk if we just repopulated it
// TODO: Re-architect this so that a call to this method doesn't invoke a new thread for saving disk cache
- if (!UmbracoSettings.isXmlContentCacheDisabled && !IsValidDiskCachePresent())
+ if (!UmbracoConfiguration.Current.UmbracoSettings.Content.XmlCacheEnabled && !IsValidDiskCachePresent())
{
QueueXmlForPersistence();
}
@@ -309,7 +310,7 @@ namespace umbraco
// queues this up, because this delegate is executing on a different thread and may complete
// after the request which invoked it (which would normally persist the file on completion)
// So we are responsible for ensuring the content is persisted in this case.
- if (!UmbracoSettings.isXmlContentCacheDisabled && UmbracoSettings.continouslyUpdateXmlDiskCache)
+ if (!UmbracoConfiguration.Current.UmbracoSettings.Content.XmlCacheEnabled && UmbracoConfiguration.Current.UmbracoSettings.Content.ContinouslyUpdateXmlDiskCache)
PersistXmlToFile(xmlDoc);
});
@@ -321,7 +322,7 @@ namespace umbraco
{
// Remove all attributes and data nodes from the published node
PublishedNode.Attributes.RemoveAll();
- string xpath = UmbracoSettings.UseLegacyXmlSchema ? "./data" : "./* [not(@id)]";
+ string xpath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "./data" : "./* [not(@id)]";
foreach (XmlNode n in PublishedNode.SelectNodes(xpath))
PublishedNode.RemoveChild(n);
@@ -385,7 +386,7 @@ namespace umbraco
// if the document is not there already then it's a new document
// we must make sure that its document type exists in the schema
var xmlContentCopy2 = xmlContentCopy;
- if (currentNode == null && UmbracoSettings.UseLegacyXmlSchema == false)
+ if (currentNode == null && UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema == false)
{
xmlContentCopy = ValidateSchema(docNode.Name, xmlContentCopy);
if (xmlContentCopy != xmlContentCopy2)
@@ -427,7 +428,7 @@ namespace umbraco
}
// TODO: Update with new schema!
- var xpath = UmbracoSettings.UseLegacyXmlSchema
+ var xpath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema
? "./node"
: "./* [@id]";
@@ -470,7 +471,7 @@ namespace umbraco
/// The parent node.
public static void SortNodes(ref XmlNode parentNode)
{
- var xpath = UmbracoSettings.UseLegacyXmlSchema
+ var xpath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema
? "./node"
: "./* [@id]";
@@ -992,7 +993,7 @@ namespace umbraco
///
private XmlDocument LoadContent()
{
- if (!UmbracoSettings.isXmlContentCacheDisabled && IsValidDiskCachePresent())
+ if (!UmbracoConfiguration.Current.UmbracoSettings.Content.XmlCacheEnabled && IsValidDiskCachePresent())
{
try
{
@@ -1194,13 +1195,13 @@ order by umbracoNode.level, umbracoNode.sortOrder";
if (hierarchy.TryGetValue(parentId, out children))
{
- XmlNode childContainer = UmbracoSettings.UseLegacyXmlSchema ||
+ XmlNode childContainer = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ||
String.IsNullOrEmpty(UmbracoSettings.TEMP_FRIENDLY_XML_CHILD_CONTAINER_NODENAME)
? parentNode
: parentNode.SelectSingleNode(
UmbracoSettings.TEMP_FRIENDLY_XML_CHILD_CONTAINER_NODENAME);
- if (!UmbracoSettings.UseLegacyXmlSchema &&
+ if (!UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema &&
!String.IsNullOrEmpty(UmbracoSettings.TEMP_FRIENDLY_XML_CHILD_CONTAINER_NODENAME))
{
if (childContainer == null)
@@ -1216,7 +1217,7 @@ order by umbracoNode.level, umbracoNode.sortOrder";
{
XmlNode childNode = nodeIndex[childId];
- if (UmbracoSettings.UseLegacyXmlSchema ||
+ if (UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ||
String.IsNullOrEmpty(UmbracoSettings.TEMP_FRIENDLY_XML_CHILD_CONTAINER_NODENAME))
{
parentNode.AppendChild(childNode);
diff --git a/src/Umbraco.Web/umbraco.presentation/default.aspx.cs b/src/Umbraco.Web/umbraco.presentation/default.aspx.cs
index e4d7c546d6..405b405859 100644
--- a/src/Umbraco.Web/umbraco.presentation/default.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/default.aspx.cs
@@ -57,7 +57,7 @@ namespace umbraco
_upage = _docRequest.UmbracoPage;
//we need to check this for backwards compatibility in case people still arent' using master pages
- if (UmbracoSettings.UseAspNetMasterPages)
+ if (UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
{
var args = new RequestInitEventArgs()
{
@@ -90,7 +90,7 @@ namespace umbraco
//This is only here for legacy if people arent' using master pages...
//TODO: We need to test that this still works!! Or do we ??
- if (!UmbracoSettings.UseAspNetMasterPages)
+ if (!UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
{
var args = new RequestInitEventArgs()
{
diff --git a/src/Umbraco.Web/umbraco.presentation/helper.cs b/src/Umbraco.Web/umbraco.presentation/helper.cs
index da93812949..f5ff53624b 100644
--- a/src/Umbraco.Web/umbraco.presentation/helper.cs
+++ b/src/Umbraco.Web/umbraco.presentation/helper.cs
@@ -4,6 +4,7 @@ using System.Text.RegularExpressions;
using System.Web;
using Umbraco.Core;
using Umbraco.Core.CodeAnnotations;
+using Umbraco.Core.Configuration;
using Umbraco.Core.Profiling;
using umbraco.BusinessLogic;
using System.Xml;
@@ -120,7 +121,7 @@ namespace umbraco
XmlNode element = umbracoXML.GetElementById(splitpath[splitpath.Length - i - 1].ToString());
if (element == null)
continue;
- string xpath = UmbracoSettings.UseLegacyXmlSchema ? "./data [@alias = '{0}']" : "{0}";
+ string xpath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "./data [@alias = '{0}']" : "{0}";
XmlNode currentNode = element.SelectSingleNode(string.Format(xpath,
keyName));
if (currentNode != null && currentNode.FirstChild != null &&
diff --git a/src/Umbraco.Web/umbraco.presentation/item.cs b/src/Umbraco.Web/umbraco.presentation/item.cs
index 1cf5e8ae31..168abe3213 100644
--- a/src/Umbraco.Web/umbraco.presentation/item.cs
+++ b/src/Umbraco.Web/umbraco.presentation/item.cs
@@ -4,6 +4,7 @@ using System.Web;
using System.Xml;
using StackExchange.Profiling;
using Umbraco.Core;
+using Umbraco.Core.Configuration;
using Umbraco.Core.Models;
using Umbraco.Core.Profiling;
@@ -113,7 +114,7 @@ namespace umbraco
if (element == null)
continue;
- var xpath = UmbracoSettings.UseLegacyXmlSchema ? "./data [@alias = '{0}']" : "./{0}";
+ var xpath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "./data [@alias = '{0}']" : "./{0}";
var currentNode = element.SelectSingleNode(string.Format(xpath, _fieldName));
//continue if all is null
@@ -183,7 +184,7 @@ namespace umbraco
// OTHER FORMATTING FUNCTIONS
// If we use masterpages, this is moved to the ItemRenderer to add support for before/after in inline XSLT
- if (!UmbracoSettings.UseAspNetMasterPages)
+ if (!UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
{
if (_fieldContent != "" && helper.FindAttribute(attributes, "insertTextBefore") != "")
_fieldContent = HttpContext.Current.Server.HtmlDecode(helper.FindAttribute(attributes, "insertTextBefore")) +
diff --git a/src/Umbraco.Web/umbraco.presentation/library.cs b/src/Umbraco.Web/umbraco.presentation/library.cs
index 10e24956f5..43988d45aa 100644
--- a/src/Umbraco.Web/umbraco.presentation/library.cs
+++ b/src/Umbraco.Web/umbraco.presentation/library.cs
@@ -11,6 +11,7 @@ using System.Xml;
using System.Xml.XPath;
using Umbraco.Core;
using Umbraco.Core.Cache;
+using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Web;
using Umbraco.Web.Cache;
@@ -452,12 +453,12 @@ namespace umbraco
{
try
{
- if (UmbracoSettings.UmbracoLibraryCacheDuration > 0)
+ if (UmbracoConfiguration.Current.UmbracoSettings.Content.UmbracoLibraryCacheDuration > 0)
{
XPathNodeIterator retVal = ApplicationContext.Current.ApplicationCache.GetCacheItem(
string.Format(
"{0}_{1}_{2}", CacheKeys.MediaCacheKey, MediaId, Deep),
- TimeSpan.FromSeconds(UmbracoSettings.UmbracoLibraryCacheDuration),
+ TimeSpan.FromSeconds(UmbracoConfiguration.Current.UmbracoSettings.Content.UmbracoLibraryCacheDuration),
() => getMediaDo(MediaId, Deep));
if (retVal != null)
@@ -486,7 +487,7 @@ namespace umbraco
XmlDocument mXml = new XmlDocument();
mXml.LoadXml(m.ToXml(mXml, Deep).OuterXml);
XPathNavigator xp = mXml.CreateNavigator();
- string xpath = UmbracoSettings.UseLegacyXmlSchema ? "/node" : String.Format("/{0}", Casing.SafeAliasWithForcingCheck(m.ContentType.Alias));
+ string xpath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "/node" : String.Format("/{0}", Casing.SafeAliasWithForcingCheck(m.ContentType.Alias));
return xp.Select(xpath);
}
return null;
@@ -503,12 +504,12 @@ namespace umbraco
{
try
{
- if (UmbracoSettings.UmbracoLibraryCacheDuration > 0)
+ if (UmbracoConfiguration.Current.UmbracoSettings.Content.UmbracoLibraryCacheDuration > 0)
{
var retVal = ApplicationContext.Current.ApplicationCache.GetCacheItem(
string.Format(
"{0}_{1}", CacheKeys.MemberLibraryCacheKey, MemberId),
- TimeSpan.FromSeconds(UmbracoSettings.UmbracoLibraryCacheDuration),
+ TimeSpan.FromSeconds(UmbracoConfiguration.Current.UmbracoSettings.Content.UmbracoLibraryCacheDuration),
() => getMemberDo(MemberId));
if (retVal != null)
@@ -977,7 +978,7 @@ namespace umbraco
/// The rendered template as a string
public static string RenderTemplate(int PageId, int TemplateId)
{
- if (UmbracoSettings.UseAspNetMasterPages)
+ if (UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
{
if (!UmbracoContext.Current.LiveEditingContext.Enabled)
{
diff --git a/src/Umbraco.Web/umbraco.presentation/macro.cs b/src/Umbraco.Web/umbraco.presentation/macro.cs
index 55255f1a52..06982151ee 100644
--- a/src/Umbraco.Web/umbraco.presentation/macro.cs
+++ b/src/Umbraco.Web/umbraco.presentation/macro.cs
@@ -17,6 +17,7 @@ using System.Xml.XPath;
using System.Xml.Xsl;
using Umbraco.Core;
using Umbraco.Core.Cache;
+using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Macros;
@@ -269,7 +270,7 @@ namespace umbraco
Alias = Model.Alias,
ItemKey = Model.ScriptName,
Exception = e,
- Behaviour = UmbracoSettings.MacroErrorBehaviour
+ Behaviour = UmbracoConfiguration.Current.UmbracoSettings.Content.MacroErrorBehaviour
};
return GetControlForErrorBehavior("Error loading Partial View script (file: " + ScriptFile + ")", macroErrorEventArgs);
};
@@ -337,7 +338,7 @@ namespace umbraco
Alias = Model.Alias,
ItemKey = Model.TypeName,
Exception = e,
- Behaviour = UmbracoSettings.MacroErrorBehaviour
+ Behaviour = UmbracoConfiguration.Current.UmbracoSettings.Content.MacroErrorBehaviour
};
macroControl = GetControlForErrorBehavior("Error loading userControl '" + Model.TypeName + "'", macroErrorEventArgs);
@@ -378,7 +379,7 @@ namespace umbraco
Alias = Model.Alias,
ItemKey = Model.TypeAssembly,
Exception = e,
- Behaviour = UmbracoSettings.MacroErrorBehaviour
+ Behaviour = UmbracoConfiguration.Current.UmbracoSettings.Content.MacroErrorBehaviour
};
macroControl = GetControlForErrorBehavior("Error loading customControl (Assembly: " + Model.TypeAssembly + ", Type: '" + Model.TypeName + "'", macroErrorEventArgs);
@@ -410,7 +411,7 @@ namespace umbraco
Alias = Model.Alias,
ItemKey = ScriptFile,
Exception = e,
- Behaviour = UmbracoSettings.MacroErrorBehaviour
+ Behaviour = UmbracoConfiguration.Current.UmbracoSettings.Content.MacroErrorBehaviour
};
return GetControlForErrorBehavior("Error loading MacroEngine script (file: " + ScriptFile + ")", macroErrorEventArgs);
@@ -866,7 +867,7 @@ namespace umbraco
Exceptions.Add(e);
LogHelper.WarnWithException("Error parsing XSLT file", e);
- var macroErrorEventArgs = new MacroErrorEventArgs { Name = Model.Name, Alias = Model.Alias, ItemKey = Model.Xslt, Exception = e, Behaviour = UmbracoSettings.MacroErrorBehaviour };
+ var macroErrorEventArgs = new MacroErrorEventArgs { Name = Model.Name, Alias = Model.Alias, ItemKey = Model.Xslt, Exception = e, Behaviour = UmbracoConfiguration.Current.UmbracoSettings.Content.MacroErrorBehaviour };
var macroControl = GetControlForErrorBehavior("Error parsing XSLT file: \\xslt\\" + XsltFile, macroErrorEventArgs);
//if it is null, then we are supposed to throw the (original) exception
// see: http://issues.umbraco.org/issue/U4-497 at the end
@@ -884,7 +885,7 @@ namespace umbraco
LogHelper.WarnWithException("Error loading XSLT " + Model.Xslt, true, e);
// Invoke any error handlers for this macro
- var macroErrorEventArgs = new MacroErrorEventArgs { Name = Model.Name, Alias = Model.Alias, ItemKey = Model.Xslt, Exception = e, Behaviour = UmbracoSettings.MacroErrorBehaviour };
+ var macroErrorEventArgs = new MacroErrorEventArgs { Name = Model.Name, Alias = Model.Alias, ItemKey = Model.Xslt, Exception = e, Behaviour = UmbracoConfiguration.Current.UmbracoSettings.Content.MacroErrorBehaviour };
var macroControl = GetControlForErrorBehavior("Error reading XSLT file: \\xslt\\" + XsltFile, macroErrorEventArgs);
//if it is null, then we are supposed to throw the (original) exception
// see: http://issues.umbraco.org/issue/U4-497 at the end
diff --git a/src/Umbraco.Web/umbraco.presentation/requestModule.cs b/src/Umbraco.Web/umbraco.presentation/requestModule.cs
index 466579e687..179b1831e6 100644
--- a/src/Umbraco.Web/umbraco.presentation/requestModule.cs
+++ b/src/Umbraco.Web/umbraco.presentation/requestModule.cs
@@ -421,8 +421,8 @@ namespace umbraco.presentation
int interval = 24 * 60 * 60; //24 hours
try
{
- if (UmbracoSettings.CleaningMiliseconds > -1)
- interval = UmbracoSettings.CleaningMiliseconds;
+ if (UmbracoConfiguration.Current.UmbracoSettings.Logging.CleaningMiliseconds > -1)
+ interval = UmbracoConfiguration.Current.UmbracoSettings.Logging.CleaningMiliseconds;
}
catch (Exception)
{
@@ -436,8 +436,8 @@ namespace umbraco.presentation
int maximumAge = 24 * 60 * 60;
try
{
- if (UmbracoSettings.MaxLogAge > -1)
- maximumAge = UmbracoSettings.MaxLogAge;
+ if (UmbracoConfiguration.Current.UmbracoSettings.Logging.MaxLogAge > -1)
+ maximumAge = UmbracoConfiguration.Current.UmbracoSettings.Logging.MaxLogAge;
}
catch (Exception)
{
diff --git a/src/Umbraco.Web/umbraco.presentation/template.cs b/src/Umbraco.Web/umbraco.presentation/template.cs
index 6e596ab5cd..65c8b514b4 100644
--- a/src/Umbraco.Web/umbraco.presentation/template.cs
+++ b/src/Umbraco.Web/umbraco.presentation/template.cs
@@ -11,6 +11,7 @@ using System.Collections;
using System.Collections.Generic;
using Umbraco.Core;
using Umbraco.Core.Cache;
+using Umbraco.Core.Configuration;
using Umbraco.Web;
using Umbraco.Web.Cache;
using umbraco.DataLayer;
@@ -264,7 +265,7 @@ namespace umbraco
pageContent.Controls.Add(new LiteralControl(""));
// NH: Switching to custom controls for macros
- if (UmbracoSettings.UseAspNetMasterPages)
+ if (UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
{
umbraco.presentation.templateControls.Macro macroControl = new umbraco.presentation.templateControls.Macro();
macroControl.Alias = helper.FindAttribute(attributes, "macroalias");
@@ -310,7 +311,7 @@ namespace umbraco
{
// NH: Switching to custom controls for items
- if (UmbracoSettings.UseAspNetMasterPages)
+ if (UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
{
umbraco.presentation.templateControls.Item itemControl = new umbraco.presentation.templateControls.Item();
itemControl.Field = helper.FindAttribute(attributes, "field");
@@ -524,7 +525,7 @@ namespace umbraco
this._templateName = t._templateName;
// Only check for master on legacy templates - can show error when using master pages.
- if (!UmbracoSettings.UseAspNetMasterPages)
+ if (!UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
{
checkForMaster(tId);
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/LiveEditing/Modules/SkinModule/ModuleInjector.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/LiveEditing/Modules/SkinModule/ModuleInjector.aspx
index d953aa81f4..7f40248e9c 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/LiveEditing/Modules/SkinModule/ModuleInjector.aspx
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/LiveEditing/Modules/SkinModule/ModuleInjector.aspx
@@ -34,7 +34,7 @@
var macroAliases = new Array();
var macroAlias = '<%= _macroAlias %>';
- <%if (umbraco.UmbracoSettings.UseAspNetMasterPages) { %>
+ <%if (umbraco.UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages) { %>
var macroElement = "umbraco:Macro";
<%}else{ %>
var macroElement = "?UMBRACO_MACRO";
@@ -95,11 +95,11 @@
if (macroString.length > 1)
macroString = macroString.substr(0, macroString.length-1);
- <%if (!umbraco.UmbracoSettings.UseAspNetMasterPages){ %>
+ <%if (!umbraco.UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages){ %>
macroString += " macroAlias=\"" + macroAlias + "\"";
<%} %>
- <%if (umbraco.UmbracoSettings.UseAspNetMasterPages){ %>
+ <%if (umbraco.UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages){ %>
macroString += " Alias=\"" + macroAlias + "\" runat=\"server\">" + macroElement + ">";
<%} else { %>
macroString += ">" + macroElement + ">";
@@ -121,7 +121,7 @@