V15/task/cleanup obsolete (#17433)
* Replace obsolete UserGroup Alias consts to key equivalent in tests * Update use of usergroup alias consts to key equivalent in IsSystemgroup extension method * Obsolete (internally) unused helper function which purpose doesn't even seem true * Prepped EmbedProviders for proper removal of non async methods and unneeded proxy methods * Remove obsoleted UmbracoPath and updated internal references * Corrected mistake and updated unittets * Update usergroup tests that use aliases for "system" groups * Replace more uses of globalsettings.UmbracoPath * Remove GetDateType by key non async * Cleanup some usages of hostingEnvironment.MapPathContentRoot * More easy obsoletion cleanup * Small Typeload cleanup * More obsolete removal * Deploy obsoletion cleanup * Remove obsolete methods from OEmbedProviderBase.cs --------- Co-authored-by: Zeegaan <skrivdetud@gmail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Cms.Core.Configuration.Models;
|
||||
using Umbraco.Cms.Core.DependencyInjection;
|
||||
using Umbraco.Cms.Core.Hosting;
|
||||
@@ -49,7 +50,7 @@ public class RenderNoContentController : Controller
|
||||
return Redirect("~/");
|
||||
}
|
||||
|
||||
var model = new NoNodesViewModel { UmbracoPath = _hostingEnvironment.ToAbsolute(_globalSettings.UmbracoPath) };
|
||||
var model = new NoNodesViewModel { UmbracoPath = _hostingEnvironment.ToAbsolute(Constants.System.DefaultUmbracoPath) };
|
||||
|
||||
return View(_globalSettings.NoNodesViewPath, model);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Cms.Core.Cache;
|
||||
using Umbraco.Cms.Core.Configuration.Models;
|
||||
using Umbraco.Cms.Core.Hosting;
|
||||
@@ -85,7 +86,7 @@ public static class HtmlHelperRenderExtensions
|
||||
var htmlBadge =
|
||||
string.Format(
|
||||
contentSettings.PreviewBadge,
|
||||
hostingEnvironment.ToAbsolute(globalSettings.UmbracoPath),
|
||||
hostingEnvironment.ToAbsolute(Constants.System.DefaultUmbracoPath),
|
||||
WebUtility.UrlEncode(httpContextAccessor.GetRequiredHttpContext().Request.Path),
|
||||
umbracoContext.PublishedRequest?.PublishedContent?.Key);
|
||||
return new HtmlString(htmlBadge);
|
||||
|
||||
Reference in New Issue
Block a user