Move UmbracoConfig singleton to Current

This commit is contained in:
Stephan
2018-12-12 17:49:24 +01:00
parent e40c9cb227
commit adced099be
77 changed files with 341 additions and 365 deletions

View File

@@ -87,10 +87,10 @@ namespace Umbraco.Web
public static bool IsAllowedTemplate(this IPublishedContent content, int templateId)
{
if (UmbracoConfig.For.UmbracoSettings().WebRouting.DisableAlternativeTemplates == true)
if (Current.Config.Umbraco().WebRouting.DisableAlternativeTemplates == true)
return content.TemplateId == templateId;
if (content.TemplateId != templateId && UmbracoConfig.For.UmbracoSettings().WebRouting.ValidateAlternativeTemplates == true)
if (content.TemplateId != templateId && Current.Config.Umbraco().WebRouting.ValidateAlternativeTemplates == true)
{
// fixme - perfs? nothing cached here
var publishedContentContentType = Current.Services.ContentTypeService.Get(content.ContentType.Id);