Inject IUmbracoContextAccessor instead of UmbracoContext

This commit is contained in:
Bjarke Berg
2019-02-14 12:40:45 +01:00
parent fe9b964ffe
commit 1770a0abec
63 changed files with 296 additions and 244 deletions

View File

@@ -34,7 +34,8 @@ namespace Umbraco.Web.Editors
[UmbracoApplicationAuthorize(Core.Constants.Applications.Settings)]
public class CodeFileController : BackOfficeNotificationsController
{
public CodeFileController(IGlobalSettings globalSettings, UmbracoContext umbracoContext, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper) : base(globalSettings, umbracoContext, sqlContext, services, appCaches, logger, runtimeState, umbracoHelper)
public CodeFileController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper)
: base(globalSettings, umbracoContextAccessor, sqlContext, services, appCaches, logger, runtimeState, umbracoHelper)
{
}
@@ -514,7 +515,7 @@ namespace Umbraco.Web.Editors
private Stylesheet CreateOrUpdateStylesheet(CodeFileDisplay display)
{
return CreateOrUpdateFile(display, ".css", Current.FileSystems.StylesheetsFileSystem,
name => Services.FileService.GetStylesheetByName(name),
name => Services.FileService.GetStylesheetByName(name),
(stylesheet, userId) => Services.FileService.SaveStylesheet(stylesheet, userId),
name => new Stylesheet(name)
);