"));
// NH: Switching to custom controls for macros
- if (UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
+ if (UmbracoConfig.For.UmbracoSettings().Templates.UseAspNetMasterPages)
{
umbraco.presentation.templateControls.Macro macroControl = new umbraco.presentation.templateControls.Macro();
macroControl.Alias = helper.FindAttribute(attributes, "macroalias");
@@ -311,7 +311,7 @@ namespace umbraco
{
// NH: Switching to custom controls for items
- if (UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
+ if (UmbracoConfig.For.UmbracoSettings().Templates.UseAspNetMasterPages)
{
umbraco.presentation.templateControls.Item itemControl = new umbraco.presentation.templateControls.Item();
itemControl.Field = helper.FindAttribute(attributes, "field");
@@ -525,7 +525,7 @@ namespace umbraco
this._templateName = t._templateName;
// Only check for master on legacy templates - can show error when using master pages.
- if (!UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
+ if (!UmbracoConfig.For.UmbracoSettings().Templates.UseAspNetMasterPages)
{
checkForMaster(tId);
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/ActionHandlers/umbEnsureUniqueName.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/ActionHandlers/umbEnsureUniqueName.cs
index ed922a8709..8a311aae44 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/ActionHandlers/umbEnsureUniqueName.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/ActionHandlers/umbEnsureUniqueName.cs
@@ -38,7 +38,7 @@ namespace umbraco.ActionHandlers
public bool Execute(umbraco.cms.businesslogic.web.Document documentObject, interfaces.IAction action)
{
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.EnsureUniqueNaming)
+ if (UmbracoConfig.For.UmbracoSettings().Content.EnsureUniqueNaming)
{
string currentName = documentObject.Text;
int uniqueNumber = 1;
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadTemplates.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadTemplates.cs
index b313b200ac..5056d970e7 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadTemplates.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadTemplates.cs
@@ -72,7 +72,7 @@ namespace umbraco
RenderTemplateFolderItems(folder, folderPath, ref tree);
else
{
- if (UmbracoConfiguration.Current.UmbracoSettings.Templates.EnableTemplateFolders)
+ if (UmbracoConfig.For.UmbracoSettings().Templates.EnableTemplateFolders)
RenderTemplateFolders(ref tree);
RenderTemplates(ref tree);
@@ -195,7 +195,7 @@ namespace umbraco
xNode.Source = GetTreeServiceUrl(t.Id);
xNode.HasChildren = t.HasChildren;
- if (UmbracoConfiguration.Current.UmbracoSettings.Templates.DefaultRenderingEngine == RenderingEngine.Mvc && ViewHelper.ViewExists(t))
+ if (UmbracoConfig.For.UmbracoSettings().Templates.DefaultRenderingEngine == RenderingEngine.Mvc && ViewHelper.ViewExists(t))
{
xNode.Action = "javascript:openView(" + t.Id + ");";
xNode.Icon = "icon-newspaper-alt";
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadUsers.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadUsers.cs
index 57b8cbd86a..5db7a06dab 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadUsers.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadUsers.cs
@@ -72,8 +72,8 @@ function openUser(id) {
bool currUserIsAdmin = currUser.IsAdmin();
foreach (User u in users.OrderBy(x => x.Disabled))
{
- if (!UmbracoConfiguration.Current.UmbracoSettings.Security.HideDisabledUsersInBackoffice
- || (UmbracoConfiguration.Current.UmbracoSettings.Security.HideDisabledUsersInBackoffice && !u.Disabled))
+ if (!UmbracoConfig.For.UmbracoSettings().Security.HideDisabledUsersInBackoffice
+ || (UmbracoConfig.For.UmbracoSettings().Security.HideDisabledUsersInBackoffice && !u.Disabled))
{
XmlTreeNode xNode = XmlTreeNode.Create(this);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs
index 348e4ffb81..c048ada53b 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs
@@ -76,7 +76,7 @@ namespace umbraco.presentation.channels
doc.getProperty(userChannel.FieldExcerptAlias).Value = removeLeftUrl(post.mt_excerpt);
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.TidyEditorContent)
+ if (UmbracoConfig.For.UmbracoSettings().Content.TidyEditorContent)
doc.getProperty(userChannel.FieldDescriptionAlias).Value = library.Tidy(removeLeftUrl(post.description), false);
else
doc.getProperty(userChannel.FieldDescriptionAlias).Value = removeLeftUrl(post.description);
@@ -387,7 +387,7 @@ namespace umbraco.presentation.channels
// Description
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.TidyEditorContent)
+ if (UmbracoConfig.For.UmbracoSettings().Content.TidyEditorContent)
doc.getProperty(userChannel.FieldDescriptionAlias).Value = library.Tidy(removeLeftUrl(post.description), false);
else
doc.getProperty(userChannel.FieldDescriptionAlias).Value = removeLeftUrl(post.description);
@@ -517,7 +517,7 @@ namespace umbraco.presentation.channels
private static bool validateUser(string username, string password)
{
- return Membership.Providers[UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider].ValidateUser(username, password);
+ return Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider].ValidateUser(username, password);
}
[XmlRpcMethod("blogger.getUsersBlogs",
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs
index 25905a8a40..7ebe703486 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs
@@ -527,7 +527,7 @@ namespace umbraco.controls
{
string caption = p.PropertyType.Name;
if (p.PropertyType.Description != null && p.PropertyType.Description != String.Empty)
- switch (UmbracoConfiguration.Current.UmbracoSettings.Content.PropertyContextHelpOption)
+ switch (UmbracoConfig.For.UmbracoSettings().Content.PropertyContextHelpOption)
{
case "icon":
caption += "

";
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/GenericProperties/GenericProperty.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/GenericProperties/GenericProperty.ascx.cs
index 9040931eba..af0986aee0 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/GenericProperties/GenericProperty.ascx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/GenericProperties/GenericProperty.ascx.cs
@@ -247,7 +247,7 @@ namespace umbraco.controls.GenericProperties
private void SetDefaultDocumentTypeProperty()
{
var itemToSelect = ddlTypes.Items.Cast
()
- .FirstOrDefault(item => item.Text.ToLowerInvariant() == UmbracoConfiguration.Current.UmbracoSettings.Content.DefaultDocumentTypeProperty.ToLowerInvariant());
+ .FirstOrDefault(item => item.Text.ToLowerInvariant() == UmbracoConfig.For.UmbracoSettings().Content.DefaultDocumentTypeProperty.ToLowerInvariant());
if (itemToSelect != null)
{
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/macroParameterControl.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/macroParameterControl.cs
index 3048eea2cf..cbabf377fd 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/macroParameterControl.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/macroParameterControl.cs
@@ -75,7 +75,7 @@ namespace umbraco.controls
/// The correct syntax for the macro including all parameters
public string GetMacroTag() {
string tag = "";
- if (UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
+ if (UmbracoConfig.For.UmbracoSettings().Templates.UseAspNetMasterPages)
{
tag = " 0)
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/userTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/userTasks.cs
index 17d17a5dc5..bd9443fb3a 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/userTasks.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/create/userTasks.cs
@@ -37,10 +37,10 @@ namespace umbraco
try
{
// Password is auto-generated. They are they required to change the password by editing the user information.
- var u = Membership.Providers[UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider].CreateUser(Alias,
+ var u = Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider].CreateUser(Alias,
Membership.GeneratePassword(
- Membership.Providers[UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider].MinRequiredPasswordLength,
- Membership.Providers[UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider].MinRequiredNonAlphanumericCharacters),
+ Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider].MinRequiredPasswordLength,
+ Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider].MinRequiredNonAlphanumericCharacters),
"", "", "", true, null, out status);
_returnUrl = string.Format("users/EditUser.aspx?id={0}", u.ProviderUserKey);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/xslt.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/xslt.ascx.cs
index b6d1929764..db7cdd79c8 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/xslt.ascx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/create/xslt.ascx.cs
@@ -60,7 +60,7 @@ namespace umbraco.presentation.create
private static string getXsltTemplatePath()
{
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema) {
+ if (UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema) {
return "/xslt/templates";
} else {
return "/xslt/templates/schema2";
@@ -75,7 +75,7 @@ namespace umbraco.presentation.create
if (createMacro.Checked)
createMacroVal = 1;
- var xsltName = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? xsltTemplate.SelectedValue :
+ var xsltName = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ? xsltTemplate.SelectedValue :
Path.Combine("schema2", xsltTemplate.SelectedValue);
var returnUrl = LegacyDialogHandler.Create(
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/ChangePassword.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/ChangePassword.ascx.cs
index 3364a8e42a..5ac63185d6 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/ChangePassword.ascx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/ChangePassword.ascx.cs
@@ -20,7 +20,7 @@ namespace umbraco.presentation.umbraco.dashboard
protected void changePassword_Click(object sender, EventArgs e)
{
User u = User.GetCurrent();
- MembershipProvider provider = Membership.Providers[UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider];
+ MembershipProvider provider = Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider];
MembershipUser user = provider.GetUser(u.LoginName, true);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/BrowseRepository.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/BrowseRepository.aspx.cs
index 95471ece48..6085caeb48 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/BrowseRepository.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/BrowseRepository.aspx.cs
@@ -56,7 +56,7 @@ namespace umbraco.presentation.developer.packages {
UmbracoVersion.Current.Major,
UmbracoVersion.Current.Minor,
UmbracoVersion.Current.Build,
- UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema.ToString(), Environment.Version,
+ UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema.ToString(), Environment.Version,
Umbraco.Core.SystemUtilities.GetCurrentTrustLevel());
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/LoadNitros.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/LoadNitros.ascx.cs
index 59ff27b0ec..f258ecf323 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/LoadNitros.ascx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/LoadNitros.ascx.cs
@@ -177,7 +177,7 @@ namespace umbraco.presentation.developer.packages {
try
{
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema)
+ if (UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema)
rep_nitros.DataSource = repo.Webservice.NitrosCategorizedByVersion(cms.businesslogic.packager.repositories.Version.Version4);
else
rep_nitros.DataSource = repo.Webservice.NitrosCategorizedByVersion(cms.businesslogic.packager.repositories.Version.Version41);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Xslt/xsltInsertValueOf.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Xslt/xsltInsertValueOf.aspx.cs
index 9c6c693cd3..b8fbdf25a5 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Xslt/xsltInsertValueOf.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Xslt/xsltInsertValueOf.aspx.cs
@@ -38,7 +38,7 @@ namespace umbraco.developer
foreach (PropertyType pt in PropertyType.GetAll())
if (!existingGenProps.Contains("," + pt.Alias + ","))
{
- if(UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema)
+ if(UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema)
preValuesSource.Add(string.Format("data [@alias = '{0}']", pt.Alias));
else
preValuesSource.Add(pt.Alias);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/umbracoField.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/umbracoField.aspx.cs
index 0317d64f13..6666898a6d 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/umbracoField.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/umbracoField.aspx.cs
@@ -43,7 +43,7 @@ namespace umbraco.dialogs
pp_removePTags.Text = ui.Text("templateEditor", "removeParagraph");
- if (UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
+ if (UmbracoConfig.For.UmbracoSettings().Templates.UseAspNetMasterPages)
{
tagName.Value = "umbraco:Item";
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.cs
index 62c3f32b70..f5bb290d47 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.cs
@@ -70,10 +70,10 @@ namespace umbraco.cms.presentation
protected void Button1_Click(object sender, System.EventArgs e)
{
// Authenticate users by using the provider specified in umbracoSettings.config
- if (Membership.Providers[UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider].ValidateUser(lname.Text, passw.Text))
+ if (Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider].ValidateUser(lname.Text, passw.Text))
{
- if (Membership.Providers[UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider] is ActiveDirectoryMembershipProvider)
- ActiveDirectoryMapping(lname.Text, Membership.Providers[UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider].GetUser(lname.Text, false).Email);
+ if (Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider] is ActiveDirectoryMembershipProvider)
+ ActiveDirectoryMapping(lname.Text, Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider].GetUser(lname.Text, false).Email);
var u = new User(lname.Text);
doLogin(u);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/nodeFactory/Node.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/nodeFactory/Node.cs
index 35cdf50281..db5046d196 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/nodeFactory/Node.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/nodeFactory/Node.cs
@@ -489,7 +489,7 @@ namespace umbraco.NodeFactory
if (_pageXmlNode.Attributes.GetNamedItem("writerID") != null)
_writerID = int.Parse(_pageXmlNode.Attributes.GetNamedItem("writerID").Value);
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema)
+ if (UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema)
{
if (_pageXmlNode.Attributes.GetNamedItem("nodeTypeAlias") != null)
_nodeTypeAlias = _pageXmlNode.Attributes.GetNamedItem("nodeTypeAlias").Value;
@@ -513,12 +513,12 @@ namespace umbraco.NodeFactory
}
// load data
- string dataXPath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "data" : "* [not(@isDoc)]";
+ string dataXPath = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ? "data" : "* [not(@isDoc)]";
foreach (XmlNode n in _pageXmlNode.SelectNodes(dataXPath))
_properties.Add(new Property(n));
// load children
- string childXPath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "node" : "* [@isDoc]";
+ string childXPath = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ? "node" : "* [@isDoc]";
XPathNavigator nav = _pageXmlNode.CreateNavigator();
XPathExpression expr = nav.Compile(childXPath);
expr.AddSort("@sortOrder", XmlSortOrder.Ascending, XmlCaseOrder.None, "", XmlDataType.Number);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/nodeFactory/Page_Legacy.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/nodeFactory/Page_Legacy.cs
index 6e900df610..a779d4bcdd 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/nodeFactory/Page_Legacy.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/nodeFactory/Page_Legacy.cs
@@ -465,7 +465,7 @@ namespace umbraco.presentation.nodeFactory
if (_pageXmlNode.Attributes.GetNamedItem("writerID") != null)
_writerID = int.Parse(_pageXmlNode.Attributes.GetNamedItem("writerID").Value);
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema)
+ if (UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema)
{
if (_pageXmlNode.Attributes.GetNamedItem("nodeTypeAlias") != null)
_nodeTypeAlias = _pageXmlNode.Attributes.GetNamedItem("nodeTypeAlias").Value;
@@ -486,12 +486,12 @@ namespace umbraco.presentation.nodeFactory
}
// load data
- string dataXPath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "data" : "* [not(@isDoc)]";
+ string dataXPath = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ? "data" : "* [not(@isDoc)]";
foreach (XmlNode n in _pageXmlNode.SelectNodes(dataXPath))
_properties.Add(new Property(n));
// load children
- string childXPath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "node" : "* [@isDoc]";
+ string childXPath = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ? "node" : "* [@isDoc]";
XPathNavigator nav = _pageXmlNode.CreateNavigator();
XPathExpression expr = nav.Compile(childXPath);
expr.AddSort("@sortOrder", XmlSortOrder.Ascending, XmlCaseOrder.None, "", XmlDataType.Number);
@@ -569,7 +569,7 @@ namespace umbraco.presentation.nodeFactory
// For backward compatibility with 2.x (the version attribute has been removed from 3.0 data nodes)
if (PropertyXmlData.Attributes.GetNamedItem("versionID") != null)
_version = new Guid(PropertyXmlData.Attributes.GetNamedItem("versionID").Value);
- _alias = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ?
+ _alias = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ?
PropertyXmlData.Attributes.GetNamedItem("alias").Value :
PropertyXmlData.Name;
_value = xmlHelper.GetNodeValue(PropertyXmlData);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/nodeFactory/Property.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/nodeFactory/Property.cs
index a5b85bfc2f..b44a4882b2 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/nodeFactory/Property.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/nodeFactory/Property.cs
@@ -48,7 +48,7 @@ namespace umbraco.NodeFactory
// For backward compatibility with 2.x (the version attribute has been removed from 3.0 data nodes)
if (PropertyXmlData.Attributes.GetNamedItem("versionID") != null)
_version = new Guid(PropertyXmlData.Attributes.GetNamedItem("versionID").Value);
- _alias = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ?
+ _alias = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ?
PropertyXmlData.Attributes.GetNamedItem("alias").Value :
PropertyXmlData.Name;
_value = xmlHelper.GetNodeValue(PropertyXmlData);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editTemplate.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editTemplate.aspx.cs
index 0b8a8f1e7f..91835f44ab 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editTemplate.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editTemplate.aspx.cs
@@ -132,7 +132,7 @@ namespace umbraco.cms.presentation.settings
editorSource.Menu.NewElement("div", "splitButtonMacroPlaceHolder", "sbPlaceHolder", 40);
- if (UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
+ if (UmbracoConfig.For.UmbracoSettings().Templates.UseAspNetMasterPages)
{
MenuIconI umbContainer = editorSource.Menu.NewIcon();
umbContainer.ImageURL = UmbracoPath + "/images/editor/masterpagePlaceHolder.gif";
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx.cs
index dae8ad16d6..850cc5eb33 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx.cs
@@ -57,15 +57,15 @@ namespace umbraco.cms.presentation.settings.scripts
lttPath.Text = "" + path + "";
- var exts = UmbracoConfiguration.Current.UmbracoSettings.Content.ScriptFileTypes.ToList();
- if (UmbracoConfiguration.Current.UmbracoSettings.Templates.DefaultRenderingEngine == RenderingEngine.Mvc)
+ var exts = UmbracoConfig.For.UmbracoSettings().Content.ScriptFileTypes.ToList();
+ if (UmbracoConfig.For.UmbracoSettings().Templates.DefaultRenderingEngine == RenderingEngine.Mvc)
{
exts.Add("cshtml");
exts.Add("vbhtml");
}
var dirs = SystemDirectories.Scripts;
- if (UmbracoConfiguration.Current.UmbracoSettings.Templates.DefaultRenderingEngine == RenderingEngine.Mvc)
+ if (UmbracoConfig.For.UmbracoSettings().Templates.DefaultRenderingEngine == RenderingEngine.Mvc)
dirs += "," + SystemDirectories.MvcViews;
// validate file
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/translation/default.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/translation/default.aspx.cs
index 78da6d2d4f..8064dd3627 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/translation/default.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/translation/default.aspx.cs
@@ -188,7 +188,7 @@ namespace umbraco.presentation.translation
foreach (XmlNode taskXml in tasks)
{
- string xpath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "node" : "* [@isDoc]";
+ string xpath = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ? "node" : "* [@isDoc]";
XmlNode taskNode = taskXml.SelectSingleNode(xpath);
// validate file
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/translation/xml.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/translation/xml.aspx.cs
index 6352041dbd..cd070e0a5a 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/translation/xml.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/translation/xml.aspx.cs
@@ -69,7 +69,7 @@ namespace umbraco.presentation.translation
while (ide.MoveNext())
{
var x = (XmlElement)ide.Value;
- var parentXpath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "//node [@id = '" + x.SelectSingleNode("//node").Attributes.GetNamedItem("parentID").Value + "']" :
+ var parentXpath = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ? "//node [@id = '" + x.SelectSingleNode("//node").Attributes.GetNamedItem("parentID").Value + "']" :
"//* [@isDoc and @id = '" + x.SelectSingleNode("//* [@isDoc]").Attributes.GetNamedItem("parentID").Value + "']";
var parent = _xd.SelectSingleNode(parentXpath);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/uQuery.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/uQuery.cs
index e96fade2b6..0e17c0400f 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/uQuery.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/uQuery.cs
@@ -107,7 +107,7 @@ namespace umbraco
try
{
- isLegacyXmlSchema = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema;
+ isLegacyXmlSchema = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema;
}
catch (MissingMethodException)
{
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs
index a3679e4a22..cdafda1c0a 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs
@@ -302,7 +302,7 @@ namespace umbraco.cms.presentation.user
if (!IsPostBack)
{
- MembershipUser user = Membership.Providers[UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider].GetUser(u.LoginName, true);
+ MembershipUser user = Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider].GetUser(u.LoginName, true);
uname.Text = u.Name;
lname.Text = (user == null) ? u.LoginName : user.UserName;
email.Text = (user == null) ? u.Email : user.Email;
@@ -367,7 +367,7 @@ namespace umbraco.cms.presentation.user
{
try
{
- MembershipUser user = Membership.Providers[UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider].GetUser(u.LoginName, true);
+ MembershipUser user = Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider].GetUser(u.LoginName, true);
string tempPassword = ((controls.passwordChanger)passw.Controls[0]).Password;
@@ -379,14 +379,14 @@ namespace umbraco.cms.presentation.user
}
// Is it using the default membership provider
- if (Membership.Providers[UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider] is UsersMembershipProvider)
+ if (Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider] is UsersMembershipProvider)
{
// Save user in membership provider
UsersMembershipUser umbracoUser = user as UsersMembershipUser;
umbracoUser.FullName = uname.Text.Trim();
umbracoUser.Language = userLanguage.SelectedValue;
umbracoUser.UserType = UserType.GetUserType(int.Parse(userType.SelectedValue));
- Membership.Providers[UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider].UpdateUser(umbracoUser);
+ Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider].UpdateUser(umbracoUser);
// Save user details
u.Email = email.Text.Trim();
@@ -397,7 +397,7 @@ namespace umbraco.cms.presentation.user
u.Name = uname.Text.Trim();
u.Language = userLanguage.SelectedValue;
u.UserType = UserType.GetUserType(int.Parse(userType.SelectedValue));
- if (!(Membership.Providers[UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider] is ActiveDirectoryMembershipProvider)) Membership.Providers[UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider].UpdateUser(user);
+ if (!(Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider] is ActiveDirectoryMembershipProvider)) Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider].UpdateUser(user);
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx.cs
index 6746f15407..403b8e4816 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx.cs
@@ -223,7 +223,7 @@ namespace umbraco.presentation.umbraco.webservices
if (!string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(password))
{
- var mp = Membership.Providers[UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider];
+ var mp = Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider];
if (mp != null && mp.ValidateUser(username, password))
{
var user = new User(username);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/codeEditorSave.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/codeEditorSave.asmx.cs
index 3f820c1aa4..5a6061e5f1 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/codeEditorSave.asmx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/codeEditorSave.asmx.cs
@@ -99,7 +99,7 @@ namespace umbraco.presentation.webservices
try
{
// Check if there's any documents yet
- string xpath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "/root/node" : "/root/*";
+ string xpath = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ? "/root/node" : "/root/*";
if (content.Instance.XmlContent.SelectNodes(xpath).Count > 0)
{
var macroXML = new XmlDocument();
@@ -282,7 +282,7 @@ namespace umbraco.presentation.webservices
{
var engine = MacroEngineFactory.GetByFilename(tempFileName);
var tempErrorMessage = "";
- var xpath = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "/root/node" : "/root/*";
+ var xpath = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ? "/root/node" : "/root/*";
if (
!engine.Validate(fileContents, tempFileName, Node.GetNodeByXpath(xpath),
out tempErrorMessage))
@@ -380,7 +380,7 @@ namespace umbraco.presentation.webservices
SystemDirectories.Scripts);
// validate extension
IOHelper.ValidateFileExtension(IOHelper.MapPath(SystemDirectories.Scripts + "/" + filename),
- UmbracoConfiguration.Current.UmbracoSettings.Content.ScriptFileTypes.ToList());
+ UmbracoConfig.For.UmbracoSettings().Content.ScriptFileTypes.ToList());
var val = contents;
diff --git a/src/Umbraco.Web/umbraco.presentation/viewstateMoverModule.cs b/src/Umbraco.Web/umbraco.presentation/viewstateMoverModule.cs
index 0e110d9759..e2b0cd62ed 100644
--- a/src/Umbraco.Web/umbraco.presentation/viewstateMoverModule.cs
+++ b/src/Umbraco.Web/umbraco.presentation/viewstateMoverModule.cs
@@ -27,7 +27,7 @@ namespace umbraco.presentation
void IHttpModule.Init(HttpApplication context)
{
- if (UmbracoConfiguration.Current.UmbracoSettings.ViewStateMoverModule.Enable)
+ if (UmbracoConfig.For.UmbracoSettings().ViewStateMoverModule.Enable)
{
context.BeginRequest += new EventHandler(context_BeginRequest);
}
diff --git a/src/umbraco.MacroEngines/RazorDynamicNode/DynamicNode.cs b/src/umbraco.MacroEngines/RazorDynamicNode/DynamicNode.cs
index 2359e2eb9c..c4ee935461 100644
--- a/src/umbraco.MacroEngines/RazorDynamicNode/DynamicNode.cs
+++ b/src/umbraco.MacroEngines/RazorDynamicNode/DynamicNode.cs
@@ -486,7 +486,7 @@ namespace umbraco.MacroEngines
var dataType = GetDataType(propResult.ContextAlias, propResult.Alias);
//now we need to map to the old object until we can clean all this nonsense up
- var configMapping = UmbracoConfiguration.Current.UmbracoSettings.Scripting.DataTypeModelStaticMappings
+ var configMapping = UmbracoConfig.For.UmbracoSettings().Scripting.DataTypeModelStaticMappings
.Select(x => new RazorDataTypeModelStaticMappingItem()
{
DataTypeGuid = x.DataTypeGuid,
@@ -812,7 +812,7 @@ namespace umbraco.MacroEngines
//check that the document element is not one of the disallowed elements
//allows RTE to still return as html if it's valid xhtml
string documentElement = e.Name.LocalName;
- if (UmbracoConfiguration.Current.UmbracoSettings.Scripting.NotDynamicXmlDocumentElements.Any(tag =>
+ if (UmbracoConfig.For.UmbracoSettings().Scripting.NotDynamicXmlDocumentElements.Any(tag =>
string.Equals(tag.Element, documentElement, StringComparison.CurrentCultureIgnoreCase)) == false)
{
result = new DynamicXml(e);
diff --git a/src/umbraco.businesslogic/Log.cs b/src/umbraco.businesslogic/Log.cs
index 7bdfe01c73..4803bf5dcc 100644
--- a/src/umbraco.businesslogic/Log.cs
+++ b/src/umbraco.businesslogic/Log.cs
@@ -31,13 +31,13 @@ namespace umbraco.BusinessLogic
if (_externalLoggerInitiated == false)
{
_externalLoggerInitiated = true;
- if (string.IsNullOrEmpty(UmbracoConfiguration.Current.UmbracoSettings.Logging.ExternalLoggerAssembly) == false
- && string.IsNullOrEmpty(UmbracoConfiguration.Current.UmbracoSettings.Logging.ExternalLoggerType) == false)
+ if (string.IsNullOrEmpty(UmbracoConfig.For.UmbracoSettings().Logging.ExternalLoggerAssembly) == false
+ && string.IsNullOrEmpty(UmbracoConfig.For.UmbracoSettings().Logging.ExternalLoggerType) == false)
{
try
{
- var assemblyPath = IOHelper.MapPath(UmbracoConfiguration.Current.UmbracoSettings.Logging.ExternalLoggerAssembly);
- _externalLogger = Assembly.LoadFrom(assemblyPath).CreateInstance(UmbracoConfiguration.Current.UmbracoSettings.Logging.ExternalLoggerType) as Interfaces.ILog;
+ var assemblyPath = IOHelper.MapPath(UmbracoConfig.For.UmbracoSettings().Logging.ExternalLoggerAssembly);
+ _externalLogger = Assembly.LoadFrom(assemblyPath).CreateInstance(UmbracoConfig.For.UmbracoSettings().Logging.ExternalLoggerType) as Interfaces.ILog;
}
catch (Exception ee)
{
@@ -78,21 +78,21 @@ namespace umbraco.BusinessLogic
{
Instance.ExternalLogger.Add(type, user, nodeId, comment);
- if (UmbracoConfiguration.Current.UmbracoSettings.Logging.ExternalLoggerEnableAuditTrail == false)
+ if (UmbracoConfig.For.UmbracoSettings().Logging.ExternalLoggerEnableAuditTrail == false)
{
AddLocally(type, user, nodeId, comment);
}
}
else
{
- if (UmbracoConfiguration.Current.UmbracoSettings.Logging.EnableLogging == false) return;
+ if (UmbracoConfig.For.UmbracoSettings().Logging.EnableLogging == false) return;
- if (UmbracoConfiguration.Current.UmbracoSettings.Logging.DisabledLogTypes.Any(x => x.LogTypeAlias.InvariantEquals(type.ToString())) == false)
+ if (UmbracoConfig.For.UmbracoSettings().Logging.DisabledLogTypes.Any(x => x.LogTypeAlias.InvariantEquals(type.ToString())) == false)
{
if (comment != null && comment.Length > 3999)
comment = comment.Substring(0, 3955) + "...";
- if (UmbracoConfiguration.Current.UmbracoSettings.Logging.EnableAsyncLogging)
+ if (UmbracoConfig.For.UmbracoSettings().Logging.EnableAsyncLogging)
{
ThreadPool.QueueUserWorkItem(
delegate { AddSynced(type, user == null ? 0 : user.Id, nodeId, comment); });
@@ -135,7 +135,7 @@ namespace umbraco.BusinessLogic
if (comment.Length > 3999)
comment = comment.Substring(0, 3955) + "...";
- if (UmbracoConfiguration.Current.UmbracoSettings.Logging.EnableAsyncLogging)
+ if (UmbracoConfig.For.UmbracoSettings().Logging.EnableAsyncLogging)
{
ThreadPool.QueueUserWorkItem(
delegate { AddSynced(type, user == null ? 0 : user.Id, nodeId, comment); });
@@ -199,7 +199,7 @@ namespace umbraco.BusinessLogic
public List GetAuditLogItems(int NodeId)
{
- if (UmbracoConfiguration.Current.UmbracoSettings.Logging.ExternalLoggerEnableAuditTrail && ExternalLogger != null)
+ if (UmbracoConfig.For.UmbracoSettings().Logging.ExternalLoggerEnableAuditTrail && ExternalLogger != null)
return ExternalLogger.GetAuditLogReader(NodeId);
return LogItem.ConvertIRecordsReader(SqlHelper.ExecuteReader(
diff --git a/src/umbraco.businesslogic/UmbracoSettings.cs b/src/umbraco.businesslogic/UmbracoSettings.cs
index 3b5af36d9f..904c35fc4b 100644
--- a/src/umbraco.businesslogic/UmbracoSettings.cs
+++ b/src/umbraco.businesslogic/UmbracoSettings.cs
@@ -42,7 +42,7 @@ namespace umbraco
///
public static bool UploadAllowDirectories
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.UploadAllowDirectories; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.UploadAllowDirectories; }
}
///
@@ -51,7 +51,7 @@ namespace umbraco
/// true if logging is enabled; otherwise, false.
public static bool EnableLogging
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Logging.EnableLogging; }
+ get { return UmbracoConfig.For.UmbracoSettings().Logging.EnableLogging; }
}
///
@@ -60,7 +60,7 @@ namespace umbraco
/// true if async logging is enabled; otherwise, false.
public static bool EnableAsyncLogging
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Logging.EnableAsyncLogging; }
+ get { return UmbracoConfig.For.UmbracoSettings().Logging.EnableAsyncLogging; }
}
///
@@ -68,14 +68,14 @@ namespace umbraco
///
public static string ExternalLoggerAssembly
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Logging.ExternalLoggerAssembly; }
+ get { return UmbracoConfig.For.UmbracoSettings().Logging.ExternalLoggerAssembly; }
}
///
/// Gets the type of an external logger that can be used to store log items in 3rd party systems
///
public static string ExternalLoggerType
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Logging.ExternalLoggerType; }
+ get { return UmbracoConfig.For.UmbracoSettings().Logging.ExternalLoggerType; }
}
///
@@ -83,7 +83,7 @@ namespace umbraco
///
public static bool ExternalLoggerLogAuditTrail
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Logging.ExternalLoggerEnableAuditTrail; }
+ get { return UmbracoConfig.For.UmbracoSettings().Logging.ExternalLoggerEnableAuditTrail; }
}
///
@@ -91,7 +91,7 @@ namespace umbraco
///
public static bool KeepUserLoggedIn
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Security.KeepUserLoggedIn; }
+ get { return UmbracoConfig.For.UmbracoSettings().Security.KeepUserLoggedIn; }
}
///
@@ -99,7 +99,7 @@ namespace umbraco
///
public static bool HideDisabledUsersInBackoffice
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Security.HideDisabledUsersInBackoffice; }
+ get { return UmbracoConfig.For.UmbracoSettings().Security.HideDisabledUsersInBackoffice; }
}
///
@@ -108,7 +108,7 @@ namespace umbraco
/// true if logs are to be automatically cleaned; otherwise, false
public static bool AutoCleanLogs
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Logging.AutoCleanLogs; }
+ get { return UmbracoConfig.For.UmbracoSettings().Logging.AutoCleanLogs; }
}
///
@@ -116,12 +116,12 @@ namespace umbraco
///
public static int CleaningMiliseconds
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Logging.CleaningMiliseconds; }
+ get { return UmbracoConfig.For.UmbracoSettings().Logging.CleaningMiliseconds; }
}
public static int MaxLogAge
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Logging.MaxLogAge; }
+ get { return UmbracoConfig.For.UmbracoSettings().Logging.MaxLogAge; }
}
///
@@ -148,7 +148,7 @@ namespace umbraco
/// true if umbraco will use domain prefixes; otherwise, false.
public static bool UseDomainPrefixes
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.RequestHandler.UseDomainPrefixes; }
+ get { return UmbracoConfig.For.UmbracoSettings().RequestHandler.UseDomainPrefixes; }
}
///
@@ -157,7 +157,7 @@ namespace umbraco
///
public static bool AddTrailingSlash
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.RequestHandler.AddTrailingSlash; }
+ get { return UmbracoConfig.For.UmbracoSettings().RequestHandler.AddTrailingSlash; }
}
///
@@ -166,7 +166,7 @@ namespace umbraco
/// true if umbraco will use ASP.NET MasterPages; otherwise, false.
public static bool UseAspNetMasterPages
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages; }
+ get { return UmbracoConfig.For.UmbracoSettings().Templates.UseAspNetMasterPages; }
}
@@ -176,7 +176,7 @@ namespace umbraco
/// true if umbraco will override templates with skins if present and configured false.
public static bool EnableTemplateFolders
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Templates.EnableTemplateFolders; }
+ get { return UmbracoConfig.For.UmbracoSettings().Templates.EnableTemplateFolders; }
}
///
@@ -184,14 +184,14 @@ namespace umbraco
///
public static List NotDynamicXmlDocumentElements
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Scripting.NotDynamicXmlDocumentElements.Select(x => x.Element).ToList(); }
+ get { return UmbracoConfig.For.UmbracoSettings().Scripting.NotDynamicXmlDocumentElements.Select(x => x.Element).ToList(); }
}
public static List RazorDataTypeModelStaticMapping
{
get
{
- var mapping = UmbracoConfiguration.Current.UmbracoSettings.Scripting.DataTypeModelStaticMappings;
+ var mapping = UmbracoConfig.For.UmbracoSettings().Scripting.DataTypeModelStaticMappings;
//now we need to map to the old object until we can clean all this nonsense up
return mapping.Select(x => new RazorDataTypeModelStaticMappingItem()
@@ -213,7 +213,7 @@ namespace umbraco
///
public static bool CloneXmlCacheOnPublish
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.CloneXmlContent; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.CloneXmlContent; }
}
///
@@ -222,7 +222,7 @@ namespace umbraco
/// true if content is parsed; otherwise, false.
public static bool TidyEditorContent
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.TidyEditorContent; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.TidyEditorContent; }
}
///
@@ -231,7 +231,7 @@ namespace umbraco
/// The encoding type as string.
public static string TidyCharEncoding
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.TidyCharEncoding; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.TidyCharEncoding; }
}
///
@@ -240,12 +240,12 @@ namespace umbraco
/// The property context help option.
public static string PropertyContextHelpOption
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.PropertyContextHelpOption; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.PropertyContextHelpOption; }
}
public static string DefaultBackofficeProvider
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Providers.DefaultBackOfficeUserProvider; }
+ get { return UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider; }
}
///
@@ -253,7 +253,7 @@ namespace umbraco
///
public static bool ForceSafeAliases
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.ForceSafeAliases; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.ForceSafeAliases; }
}
///
@@ -261,7 +261,7 @@ namespace umbraco
///
public static IEnumerable DisallowedUploadFiles
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.DisallowedUploadFiles; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.DisallowedUploadFiles; }
}
///
@@ -270,7 +270,7 @@ namespace umbraco
/// The allowed image file types.
public static string ImageFileTypes
{
- get { return string.Join(",", UmbracoConfiguration.Current.UmbracoSettings.Content.ImageFileTypes.Select(x => x.ToLowerInvariant())); }
+ get { return string.Join(",", UmbracoConfig.For.UmbracoSettings().Content.ImageFileTypes.Select(x => x.ToLowerInvariant())); }
}
///
@@ -279,7 +279,7 @@ namespace umbraco
/// The allowed script file types.
public static string ScriptFileTypes
{
- get { return string.Join(",", UmbracoConfiguration.Current.UmbracoSettings.Content.ScriptFileTypes); }
+ get { return string.Join(",", UmbracoConfig.For.UmbracoSettings().Content.ScriptFileTypes); }
}
///
@@ -288,7 +288,7 @@ namespace umbraco
///
public static int UmbracoLibraryCacheDuration
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.UmbracoLibraryCacheDuration; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.UmbracoLibraryCacheDuration; }
}
///
@@ -297,7 +297,7 @@ namespace umbraco
/// The script folder path.
public static string ScriptFolderPath
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.ScriptFolderPath; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.ScriptFolderPath; }
}
///
@@ -305,7 +305,7 @@ namespace umbraco
///
public static bool ScriptDisableEditor
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.ScriptEditorDisable; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.ScriptEditorDisable; }
}
///
@@ -316,7 +316,7 @@ namespace umbraco
/// true if umbraco ensures unique node naming; otherwise, false.
public static bool EnsureUniqueNaming
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.EnsureUniqueNaming; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.EnsureUniqueNaming; }
}
///
@@ -325,7 +325,7 @@ namespace umbraco
/// The notification email sender.
public static string NotificationEmailSender
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.NotificationEmailAddress; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.NotificationEmailAddress; }
}
///
@@ -336,7 +336,7 @@ namespace umbraco
///
public static bool NotificationDisableHtmlEmail
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.DisableHtmlEmail; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.DisableHtmlEmail; }
}
///
@@ -345,7 +345,7 @@ namespace umbraco
/// The allowed attributes on images.
public static string ImageAllowedAttributes
{
- get { return string.Join(",", UmbracoConfiguration.Current.UmbracoSettings.Content.ImageTagAllowedAttributes); }
+ get { return string.Join(",", UmbracoConfig.For.UmbracoSettings().Content.ImageTagAllowedAttributes); }
}
public static XmlNode ImageAutoFillImageProperties
@@ -376,7 +376,7 @@ namespace umbraco
///
public static bool RemoveDoubleDashesFromUrlReplacing
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.RequestHandler.RemoveDoubleDashes; }
+ get { return UmbracoConfig.For.UmbracoSettings().RequestHandler.RemoveDoubleDashes; }
}
///
@@ -387,7 +387,7 @@ namespace umbraco
/// true if umbraco uses distributed calls; otherwise, false.
public static bool UseDistributedCalls
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.DistributedCall.Enabled; }
+ get { return UmbracoConfig.For.UmbracoSettings().DistributedCall.Enabled; }
}
@@ -397,7 +397,7 @@ namespace umbraco
/// The distributed call user.
public static int DistributedCallUser
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.DistributedCall.UserId; }
+ get { return UmbracoConfig.For.UmbracoSettings().DistributedCall.UserId; }
}
///
@@ -405,7 +405,7 @@ namespace umbraco
///
public static string PreviewBadge
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.PreviewBadge; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.PreviewBadge; }
}
///
@@ -481,7 +481,7 @@ namespace umbraco
///
public static bool UseViewstateMoverModule
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.ViewStateMoverModule.Enable; }
+ get { return UmbracoConfig.For.UmbracoSettings().ViewStateMoverModule.Enable; }
}
@@ -491,7 +491,7 @@ namespace umbraco
///
public static bool isXmlContentCacheDisabled
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.XmlCacheEnabled; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.XmlCacheEnabled; }
}
///
@@ -501,7 +501,7 @@ namespace umbraco
///
public static bool XmlContentCheckForDiskChanges
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.XmlContentCheckForDiskChanges; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.XmlContentCheckForDiskChanges; }
}
///
@@ -511,7 +511,7 @@ namespace umbraco
///
public static bool EnableGlobalPreviewStorage
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.GlobalPreviewStorageEnabled; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.GlobalPreviewStorageEnabled; }
}
///
@@ -522,12 +522,12 @@ namespace umbraco
///
public static bool UseLegacyXmlSchema
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema; }
}
public static IEnumerable AppCodeFileExtensionsList
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Developer.AppCodeFileExtensions.Select(x => x.Extension); }
+ get { return UmbracoConfig.For.UmbracoSettings().Developer.AppCodeFileExtensions.Select(x => x.Extension); }
}
[Obsolete("Use AppCodeFileExtensionsList instead")]
@@ -555,7 +555,7 @@ namespace umbraco
///
public static bool continouslyUpdateXmlDiskCache
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.ContinouslyUpdateXmlDiskCache; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.ContinouslyUpdateXmlDiskCache; }
}
///
@@ -566,12 +566,12 @@ namespace umbraco
///
public static bool EnableSplashWhileLoading
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.EnableSplashWhileLoading; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.EnableSplashWhileLoading; }
}
public static bool ResolveUrlsFromTextString
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.ResolveUrlsFromTextString; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.ResolveUrlsFromTextString; }
}
///
@@ -583,7 +583,7 @@ namespace umbraco
/// MacroErrorBehaviour enum defining how to handle macro errors.
public static MacroErrorBehaviour MacroErrorBehaviour
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.MacroErrorBehaviour; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.MacroErrorBehaviour; }
}
///
@@ -595,7 +595,7 @@ namespace umbraco
/// MacroErrorBehaviour enum defining how to show icons in the document type editor.
public static IconPickerBehaviour IconPickerBehaviour
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.IconPickerBehaviour; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.IconPickerBehaviour; }
}
///
@@ -605,7 +605,7 @@ namespace umbraco
/// If undefined, 'Textstring' is the default
public static string DefaultDocumentTypeProperty
{
- get { return UmbracoConfiguration.Current.UmbracoSettings.Content.DefaultDocumentTypeProperty; }
+ get { return UmbracoConfig.For.UmbracoSettings().Content.DefaultDocumentTypeProperty; }
}
private static string _path;
diff --git a/src/umbraco.cms/businesslogic/Content.cs b/src/umbraco.cms/businesslogic/Content.cs
index b262017553..acd47d0dba 100644
--- a/src/umbraco.cms/businesslogic/Content.cs
+++ b/src/umbraco.cms/businesslogic/Content.cs
@@ -534,7 +534,7 @@ namespace umbraco.cms.businesslogic
protected virtual XmlNode generateXmlWithoutSaving(XmlDocument xd)
{
- string nodeName = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "node" : Casing.SafeAliasWithForcingCheck(ContentType.Alias);
+ string nodeName = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ? "node" : Casing.SafeAliasWithForcingCheck(ContentType.Alias);
XmlNode x = xd.CreateNode(XmlNodeType.Element, nodeName, "");
XmlPopulate(xd, ref x, false);
return x;
@@ -595,7 +595,7 @@ namespace umbraco.cms.businesslogic
var parentDirectory = System.IO.Path.GetDirectoryName(relativeFilePath);
// don't want to delete the media folder if not using directories.
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.UploadAllowDirectories && parentDirectory != fs.GetRelativePath("/"))
+ if (UmbracoConfig.For.UmbracoSettings().Content.UploadAllowDirectories && parentDirectory != fs.GetRelativePath("/"))
{
//issue U4-771: if there is a parent directory the recursive parameter should be true
fs.DeleteDirectory(parentDirectory, String.IsNullOrEmpty(parentDirectory) == false);
diff --git a/src/umbraco.cms/businesslogic/Packager/PackageActions/addStringToHtmlElement.cs b/src/umbraco.cms/businesslogic/Packager/PackageActions/addStringToHtmlElement.cs
index 6ca7086919..a96f2fc893 100644
--- a/src/umbraco.cms/businesslogic/Packager/PackageActions/addStringToHtmlElement.cs
+++ b/src/umbraco.cms/businesslogic/Packager/PackageActions/addStringToHtmlElement.cs
@@ -36,7 +36,7 @@ namespace umbraco.cms.businesslogic.packager.standardPackageActions
string value = xmlHelper.GetNodeValue(xmlData);
template.Template tmp = template.Template.GetByAlias(templateAlias);
- if (UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
+ if (UmbracoConfig.For.UmbracoSettings().Templates.UseAspNetMasterPages)
value = tmp.EnsureMasterPageSyntax(value);
_addStringToHtmlElement(tmp, value, templateAlias, htmlElementId, position);
@@ -58,7 +58,7 @@ namespace umbraco.cms.businesslogic.packager.standardPackageActions
string value = xmlHelper.GetNodeValue(xmlData);
template.Template tmp = template.Template.GetByAlias(templateAlias);
- if (UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
+ if (UmbracoConfig.For.UmbracoSettings().Templates.UseAspNetMasterPages)
value = tmp.EnsureMasterPageSyntax(value);
_removeStringFromHtmlElement(tmp, value, templateAlias, htmlElementId);
diff --git a/src/umbraco.cms/businesslogic/Packager/Repositories/Repository.cs b/src/umbraco.cms/businesslogic/Packager/Repositories/Repository.cs
index 726bc01437..d7165557fa 100644
--- a/src/umbraco.cms/businesslogic/Packager/Repositories/Repository.cs
+++ b/src/umbraco.cms/businesslogic/Packager/Repositories/Repository.cs
@@ -69,7 +69,7 @@ namespace umbraco.cms.businesslogic.packager.repositories
var repositories = new List();
- foreach (var r in UmbracoConfiguration.Current.UmbracoSettings.PackageRepositories.Repositories)
+ foreach (var r in UmbracoConfig.For.UmbracoSettings().PackageRepositories.Repositories)
{
var repository = new Repository
{
@@ -107,7 +107,7 @@ namespace umbraco.cms.businesslogic.packager.repositories
throw new FormatException("The repositoryGuid is not a valid GUID");
}
- var found = UmbracoConfiguration.Current.UmbracoSettings.PackageRepositories.Repositories.FirstOrDefault(x => x.Id == id);
+ var found = UmbracoConfig.For.UmbracoSettings().PackageRepositories.Repositories.FirstOrDefault(x => x.Id == id);
if (found == null)
{
return null;
@@ -196,7 +196,7 @@ namespace umbraco.cms.businesslogic.packager.repositories
if (key == string.Empty)
{
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema)
+ if (UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema)
fileByteArray = this.Webservice.fetchPackage(packageGuid);
else
fileByteArray = this.Webservice.fetchPackageByVersion(packageGuid, Version.Version41);
diff --git a/src/umbraco.cms/businesslogic/Property/Property.cs b/src/umbraco.cms/businesslogic/Property/Property.cs
index 654215c342..b7450612bd 100644
--- a/src/umbraco.cms/businesslogic/Property/Property.cs
+++ b/src/umbraco.cms/businesslogic/Property/Property.cs
@@ -110,11 +110,11 @@ namespace umbraco.cms.businesslogic.property
}
public XmlNode ToXml(XmlDocument xd)
{
- string nodeName = UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema ? "data" : helpers.Casing.SafeAlias(PropertyType.Alias);
+ string nodeName = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ? "data" : helpers.Casing.SafeAlias(PropertyType.Alias);
XmlNode x = xd.CreateNode(XmlNodeType.Element, nodeName, "");
// Alias
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema)
+ if (UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema)
{
XmlAttribute alias = xd.CreateAttribute("alias");
alias.Value = this.PropertyType.Alias;
diff --git a/src/umbraco.cms/businesslogic/datatype/FileHandlerData.cs b/src/umbraco.cms/businesslogic/datatype/FileHandlerData.cs
index 3949441dfc..fad101b596 100644
--- a/src/umbraco.cms/businesslogic/datatype/FileHandlerData.cs
+++ b/src/umbraco.cms/businesslogic/datatype/FileHandlerData.cs
@@ -66,7 +66,7 @@ namespace umbraco.cms.businesslogic.datatype
{
var fs = FileSystemProviderManager.Current.GetFileSystemProvider();
- var subfolder = UmbracoConfiguration.Current.UmbracoSettings.Content.UploadAllowDirectories
+ var subfolder = UmbracoConfig.For.UmbracoSettings().Content.UploadAllowDirectories
? currentValue.Replace(fs.GetUrl("/"), "").Split('/')[0]
: currentValue.Substring(currentValue.LastIndexOf("/", StringComparison.Ordinal) + 1).Split('-')[0];
@@ -75,7 +75,7 @@ namespace umbraco.cms.businesslogic.datatype
? subfolderId.ToString(CultureInfo.InvariantCulture)
: MediaSubfolderCounter.Current.Increment().ToString(CultureInfo.InvariantCulture);
- var fileName = UmbracoConfiguration.Current.UmbracoSettings.Content.UploadAllowDirectories
+ var fileName = UmbracoConfig.For.UmbracoSettings().Content.UploadAllowDirectories
? Path.Combine(numberedFolder, name)
: numberedFolder + "-" + name;
@@ -103,10 +103,10 @@ namespace umbraco.cms.businesslogic.datatype
}
// check for auto fill of other properties (width, height, extension and filesize)
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.ImageAutoFillProperties.Any())
+ if (UmbracoConfig.For.UmbracoSettings().Content.ImageAutoFillProperties.Any())
{
var uploadFieldConfigNode =
- UmbracoConfiguration.Current.UmbracoSettings.Content.ImageAutoFillProperties.FirstOrDefault(x => x.Alias == PropertyTypeAlias);
+ UmbracoConfig.For.UmbracoSettings().Content.ImageAutoFillProperties.FirstOrDefault(x => x.Alias == PropertyTypeAlias);
if (uploadFieldConfigNode != null)
{
@@ -139,10 +139,10 @@ namespace umbraco.cms.businesslogic.datatype
if (PropertyId == default(int))
return;
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.ImageAutoFillProperties.Any())
+ if (UmbracoConfig.For.UmbracoSettings().Content.ImageAutoFillProperties.Any())
{
var uploadFieldConfigNode =
- UmbracoConfiguration.Current.UmbracoSettings.Content.ImageAutoFillProperties.FirstOrDefault(x => x.Alias == PropertyTypeAlias);
+ UmbracoConfig.For.UmbracoSettings().Content.ImageAutoFillProperties.FirstOrDefault(x => x.Alias == PropertyTypeAlias);
if (uploadFieldConfigNode != null)
{
// get the current document
diff --git a/src/umbraco.cms/businesslogic/media/Media.cs b/src/umbraco.cms/businesslogic/media/Media.cs
index fb9b46fc84..00ec1efb0b 100644
--- a/src/umbraco.cms/businesslogic/media/Media.cs
+++ b/src/umbraco.cms/businesslogic/media/Media.cs
@@ -290,7 +290,7 @@ namespace umbraco.cms.businesslogic.media
XmlGenerate(xd);
// generate preview for blame history?
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.GlobalPreviewStorageEnabled)
+ if (UmbracoConfig.For.UmbracoSettings().Content.GlobalPreviewStorageEnabled)
{
// Version as new guid to ensure different versions are generated as media are not versioned currently!
SavePreviewXml(generateXmlWithoutSaving(xd), Guid.NewGuid());
diff --git a/src/umbraco.cms/businesslogic/media/UmbracoMediaFactory.cs b/src/umbraco.cms/businesslogic/media/UmbracoMediaFactory.cs
index c2ed052c4f..29743031fd 100644
--- a/src/umbraco.cms/businesslogic/media/UmbracoMediaFactory.cs
+++ b/src/umbraco.cms/businesslogic/media/UmbracoMediaFactory.cs
@@ -92,7 +92,7 @@ namespace umbraco.cms.businesslogic.media
int subfolderId;
var currentValue = prop.Value.ToString();
- var subfolder = UmbracoConfiguration.Current.UmbracoSettings.Content.UploadAllowDirectories
+ var subfolder = UmbracoConfig.For.UmbracoSettings().Content.UploadAllowDirectories
? currentValue.Replace(FileSystem.GetUrl("/"), "").Split('/')[0]
: currentValue.Substring(currentValue.LastIndexOf("/", StringComparison.Ordinal) + 1).Split('-')[0];
diff --git a/src/umbraco.cms/businesslogic/member/Member.cs b/src/umbraco.cms/businesslogic/member/Member.cs
index 0c09194686..26497187c5 100644
--- a/src/umbraco.cms/businesslogic/member/Member.cs
+++ b/src/umbraco.cms/businesslogic/member/Member.cs
@@ -682,7 +682,7 @@ namespace umbraco.cms.businesslogic.member
XmlGenerate(xd);
// generate preview for blame history?
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.GlobalPreviewStorageEnabled)
+ if (UmbracoConfig.For.UmbracoSettings().Content.GlobalPreviewStorageEnabled)
{
// Version as new guid to ensure different versions are generated as members are not versioned currently!
SavePreviewXml(generateXmlWithoutSaving(xd), Guid.NewGuid());
diff --git a/src/umbraco.cms/businesslogic/template/Template.cs b/src/umbraco.cms/businesslogic/template/Template.cs
index 9bacc2e410..beb191067b 100644
--- a/src/umbraco.cms/businesslogic/template/Template.cs
+++ b/src/umbraco.cms/businesslogic/template/Template.cs
@@ -155,7 +155,7 @@ namespace umbraco.cms.businesslogic.template
}
dr.Close();
- if (UmbracoConfiguration.Current.UmbracoSettings.Templates.DefaultRenderingEngine == RenderingEngine.Mvc && ViewHelper.ViewExists(this))
+ if (UmbracoConfig.For.UmbracoSettings().Templates.DefaultRenderingEngine == RenderingEngine.Mvc && ViewHelper.ViewExists(this))
_design = ViewHelper.GetFileContents(this);
else
_design = MasterPageHelper.GetFileContents(this);
@@ -266,13 +266,13 @@ namespace umbraco.cms.businesslogic.template
_design = value.Trim(NewLineChars);
//we only switch to MVC View editing if the template has a view file, and MVC editing is enabled
- if (UmbracoConfiguration.Current.UmbracoSettings.Templates.DefaultRenderingEngine == RenderingEngine.Mvc && !MasterPageHelper.IsMasterPageSyntax(_design))
+ if (UmbracoConfig.For.UmbracoSettings().Templates.DefaultRenderingEngine == RenderingEngine.Mvc && !MasterPageHelper.IsMasterPageSyntax(_design))
{
MasterPageHelper.RemoveMasterPageFile(this.Alias);
MasterPageHelper.RemoveMasterPageFile(_oldAlias);
_design = ViewHelper.UpdateViewFile(this, _oldAlias);
}
- else if (UmbracoConfiguration.Current.UmbracoSettings.Templates.UseAspNetMasterPages)
+ else if (UmbracoConfig.For.UmbracoSettings().Templates.UseAspNetMasterPages)
{
ViewHelper.RemoveViewFile(this.Alias);
ViewHelper.RemoveViewFile(_oldAlias);
@@ -352,7 +352,7 @@ namespace umbraco.cms.businesslogic.template
///
private static RenderingEngine DetermineRenderingEngine(Template t, string design = null)
{
- var engine = UmbracoConfiguration.Current.UmbracoSettings.Templates.DefaultRenderingEngine;
+ var engine = UmbracoConfig.For.UmbracoSettings().Templates.DefaultRenderingEngine;
if (!design.IsNullOrWhiteSpace() && MasterPageHelper.IsMasterPageSyntax(design))
{
diff --git a/src/umbraco.cms/businesslogic/web/Document.cs b/src/umbraco.cms/businesslogic/web/Document.cs
index d24a7dc439..eb5b97160e 100644
--- a/src/umbraco.cms/businesslogic/web/Document.cs
+++ b/src/umbraco.cms/businesslogic/web/Document.cs
@@ -1314,11 +1314,11 @@ namespace umbraco.cms.businesslogic.web
x.Attributes.Append(addAttribute(xd, "urlName", urlName));
x.Attributes.Append(addAttribute(xd, "writerName", Writer.Name));
x.Attributes.Append(addAttribute(xd, "creatorName", Creator.Name.ToString()));
- if (ContentType != null && UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema)
+ if (ContentType != null && UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema)
x.Attributes.Append(addAttribute(xd, "nodeTypeAlias", ContentType.Alias));
x.Attributes.Append(addAttribute(xd, "path", Path));
- if (!UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema)
+ if (!UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema)
{
x.Attributes.Append(addAttribute(xd, "isDoc", ""));
}
diff --git a/src/umbraco.cms/businesslogic/web/DocumentType.cs b/src/umbraco.cms/businesslogic/web/DocumentType.cs
index b12943fd53..c2cb87aa9d 100644
--- a/src/umbraco.cms/businesslogic/web/DocumentType.cs
+++ b/src/umbraco.cms/businesslogic/web/DocumentType.cs
@@ -87,7 +87,7 @@ namespace umbraco.cms.businesslogic.web
public static string GenerateXmlDocumentType()
{
StringBuilder dtd = new StringBuilder();
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.UseLegacyXmlSchema)
+ if (UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema)
{
dtd.AppendLine(" ");
}
diff --git a/src/umbraco.cms/businesslogic/workflow/Notification.cs b/src/umbraco.cms/businesslogic/workflow/Notification.cs
index 837ff3da01..4814eff551 100644
--- a/src/umbraco.cms/businesslogic/workflow/Notification.cs
+++ b/src/umbraco.cms/businesslogic/workflow/Notification.cs
@@ -158,11 +158,11 @@ namespace umbraco.cms.businesslogic.workflow
};
// create the mail message
- var mail = new MailMessage(UmbracoConfiguration.Current.UmbracoSettings.Content.NotificationEmailAddress, mailingUser.Email);
+ var mail = new MailMessage(UmbracoConfig.For.UmbracoSettings().Content.NotificationEmailAddress, mailingUser.Email);
// populate the message
mail.Subject = ui.Text("notifications", "mailSubject", subjectVars, mailingUser);
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.DisableHtmlEmail)
+ if (UmbracoConfig.For.UmbracoSettings().Content.DisableHtmlEmail)
{
mail.IsBodyHtml = false;
mail.Body = ui.Text("notifications", "mailBody", bodyVars, mailingUser);
diff --git a/src/umbraco.cms/helpers/xhtml.cs b/src/umbraco.cms/helpers/xhtml.cs
index 2c6d7bbf4a..3ca90d886b 100644
--- a/src/umbraco.cms/helpers/xhtml.cs
+++ b/src/umbraco.cms/helpers/xhtml.cs
@@ -40,7 +40,7 @@ namespace umbraco.cms.helpers
tidy.Options.TidyMark = false;
// To avoid entity encoding
- tidy.Options.CharEncoding = (TidyNet.CharEncoding)Enum.Parse(typeof(TidyNet.CharEncoding), UmbracoConfiguration.Current.UmbracoSettings.Content.TidyCharEncoding);
+ tidy.Options.CharEncoding = (TidyNet.CharEncoding)Enum.Parse(typeof(TidyNet.CharEncoding), UmbracoConfig.For.UmbracoSettings().Content.TidyCharEncoding);
/* Declare the parameters that is needed */
diff --git a/src/umbraco.controls/CodeArea.cs b/src/umbraco.controls/CodeArea.cs
index cbad1a14d8..1d273e32f3 100644
--- a/src/umbraco.controls/CodeArea.cs
+++ b/src/umbraco.controls/CodeArea.cs
@@ -58,7 +58,7 @@ namespace umbraco.uicontrols
{
get
{
- return UmbracoConfiguration.Current.UmbracoSettings.Content.ScriptEditorDisable == false;
+ return UmbracoConfig.For.UmbracoSettings().Content.ScriptEditorDisable == false;
}
}
diff --git a/src/umbraco.editorControls/tinyMCE3/TinyMCE.cs b/src/umbraco.editorControls/tinyMCE3/TinyMCE.cs
index 64d859e45e..b9c5ace6c1 100644
--- a/src/umbraco.editorControls/tinyMCE3/TinyMCE.cs
+++ b/src/umbraco.editorControls/tinyMCE3/TinyMCE.cs
@@ -326,7 +326,7 @@ namespace umbraco.editorControls.tinyMCE3
parsedString = replaceMacroTags(parsedString).Trim();
// tidy html - refactored, see #30534
- if (UmbracoConfiguration.Current.UmbracoSettings.Content.TidyEditorContent)
+ if (UmbracoConfig.For.UmbracoSettings().Content.TidyEditorContent)
{
// always wrap in a - using
was a bad idea
parsedString = "
" + parsedString + "
";
diff --git a/src/umbraco.editorControls/tinymce/tinyMCEImageHelper.cs b/src/umbraco.editorControls/tinymce/tinyMCEImageHelper.cs
index 5072726efc..23da99829f 100644
--- a/src/umbraco.editorControls/tinymce/tinyMCEImageHelper.cs
+++ b/src/umbraco.editorControls/tinymce/tinyMCEImageHelper.cs
@@ -14,7 +14,7 @@ namespace umbraco.editorControls.tinymce
{
public static string cleanImages(string html)
{
- var allowedAttributes = UmbracoConfiguration.Current.UmbracoSettings.Content.ImageTagAllowedAttributes.Select(x => x.ToLower()).ToList();
+ var allowedAttributes = UmbracoConfig.For.UmbracoSettings().Content.ImageTagAllowedAttributes.Select(x => x.ToLower()).ToList();
//Always add src as it's essential to output any image at all
if (allowedAttributes.Contains("src") == false)
diff --git a/src/umbraco.editorControls/uploadfield/uploadField.cs b/src/umbraco.editorControls/uploadfield/uploadField.cs
index 472a094977..747febe57b 100644
--- a/src/umbraco.editorControls/uploadfield/uploadField.cs
+++ b/src/umbraco.editorControls/uploadfield/uploadField.cs
@@ -90,7 +90,7 @@ namespace umbraco.editorControls
//now check the file type
var extension = Path.GetExtension(postedFile.FileName).TrimStart(".");
- return UmbracoConfiguration.Current.UmbracoSettings.Content.DisallowedUploadFiles.Any(x => x.InvariantEquals(extension)) == false;
+ return UmbracoConfig.For.UmbracoSettings().Content.DisallowedUploadFiles.Any(x => x.InvariantEquals(extension)) == false;
}
public string Text