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

@@ -3,6 +3,7 @@ using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Web.Http.Filters;
using Umbraco.Core.Composing;
using Umbraco.Core.Configuration;
using Umbraco.Core.Models;
using Umbraco.Web.Models;
@@ -58,9 +59,9 @@ namespace Umbraco.Web.Editors
var cookie = new CookieHeaderValue("UMB_UPDCHK", "1")
{
Path = "/",
Expires = DateTimeOffset.Now.AddDays(UmbracoConfig.For.GlobalSettings().VersionCheckPeriod),
Expires = DateTimeOffset.Now.AddDays(Current.Config.Global().VersionCheckPeriod),
HttpOnly = true,
Secure = UmbracoConfig.For.GlobalSettings().UseHttps
Secure = Current.Config.Global().UseHttps
};
context.Response.Headers.AddCookies(new[] { cookie });
}