diff --git a/src/Umbraco.Core/Configuration/IGlobalSettings.cs b/src/Umbraco.Core/Configuration/IGlobalSettings.cs index cf9478d30a..a043f608f4 100644 --- a/src/Umbraco.Core/Configuration/IGlobalSettings.cs +++ b/src/Umbraco.Core/Configuration/IGlobalSettings.cs @@ -1,4 +1,6 @@ -namespace Umbraco.Core.Configuration +using System; + +namespace Umbraco.Core.Configuration { /// /// Contains general settings information for the entire Umbraco instance based on information from web.config appsettings @@ -24,6 +26,8 @@ /// /// Defaults to ~/App_Data/umbraco.config /// + //fixme - remove + [Obsolete("This should not be used, need to remove the content xml cache")] string ContentXmlFile { get; } /// diff --git a/src/Umbraco.Core/IO/FileSystems.cs b/src/Umbraco.Core/IO/FileSystems.cs index 5d7088b0e1..62ce25dff0 100644 --- a/src/Umbraco.Core/IO/FileSystems.cs +++ b/src/Umbraco.Core/IO/FileSystems.cs @@ -35,11 +35,7 @@ namespace Umbraco.Core.IO private object _wkfsObject; private MediaFileSystem _mediaFileSystem; - - //fixme - is this needed to be a managed file system? seems irrelevant since it won't ever be moved and is only used in one place in code - private IFileSystem _javascriptLibraryFileSystem; - #region Constructor // DI wants a public ctor @@ -129,16 +125,6 @@ namespace Umbraco.Core.IO } } - //fixme - is this needed to be a managed file system? seems irrelevant since it won't ever be moved and is only used in one place in code - internal IFileSystem JavaScriptLibraryFileSystem - { - get - { - if (Volatile.Read(ref _wkfsInitialized) == false) EnsureWellKnownFileSystems(); - return _javascriptLibraryFileSystem; - } - } - private void EnsureWellKnownFileSystems() { LazyInitializer.EnsureInitialized(ref _wkfsObject, ref _wkfsInitialized, ref _wkfsLock, CreateWellKnownFileSystems); @@ -154,7 +140,6 @@ namespace Umbraco.Core.IO var scriptsFileSystem = new PhysicalFileSystem(SystemDirectories.Scripts); var masterPagesFileSystem = new PhysicalFileSystem(SystemDirectories.Masterpages); var mvcViewsFileSystem = new PhysicalFileSystem(SystemDirectories.MvcViews); - var javaScriptLibraryFileSystem = new PhysicalFileSystem(SystemDirectories.JavaScriptLibrary); _macroPartialFileSystem = new ShadowWrapper(macroPartialFileSystem, "Views/MacroPartials", () => IsScoped()); _partialViewsFileSystem = new ShadowWrapper(partialViewsFileSystem, "Views/Partials", () => IsScoped()); @@ -162,7 +147,6 @@ namespace Umbraco.Core.IO _scriptsFileSystem = new ShadowWrapper(scriptsFileSystem, "scripts", () => IsScoped()); _masterPagesFileSystem = new ShadowWrapper(masterPagesFileSystem, "masterpages", () => IsScoped()); _mvcViewsFileSystem = new ShadowWrapper(mvcViewsFileSystem, "Views", () => IsScoped()); - _javascriptLibraryFileSystem = new ShadowWrapper(javaScriptLibraryFileSystem, "Lib", () => IsScoped()); // filesystems obtained from GetFileSystemProvider are already wrapped and do not need to be wrapped again _mediaFileSystem = GetFileSystemProvider(); diff --git a/src/Umbraco.Core/IO/SystemDirectories.cs b/src/Umbraco.Core/IO/SystemDirectories.cs index 46c5bf851c..183d48e3d9 100644 --- a/src/Umbraco.Core/IO/SystemDirectories.cs +++ b/src/Umbraco.Core/IO/SystemDirectories.cs @@ -8,24 +8,20 @@ namespace Umbraco.Core.IO { public static string Bin => "~/bin"; - public static string Config => IOHelper.ReturnPath("umbracoConfigDirectory", "~/config"); + public static string Config => "~/config"; - public static string Css => IOHelper.ReturnPath("umbracoCssDirectory", "~/css"); + public static string Data => "~/App_Data"; - public static string Data => IOHelper.ReturnPath("umbracoStorageDirectory", "~/App_Data"); + public static string Install => "~/install"; - public static string Install => IOHelper.ReturnPath("umbracoInstallPath", "~/install"); + //fixme: remove this + [Obsolete("Master pages are obsolete and code should be removed")] + public static string Masterpages => "~/masterpages"; - //TODO: Consider removing this - public static string Masterpages => IOHelper.ReturnPath("umbracoMasterPagesPath", "~/masterpages"); - - //NOTE: this is not configurable and shouldn't need to be public static string AppCode => "~/App_Code"; - //NOTE: this is not configurable and shouldn't need to be public static string AppPlugins => "~/App_Plugins"; - //NOTE: this is not configurable and shouldn't need to be public static string MvcViews => "~/Views"; public static string PartialViews => MvcViews + "/Partials/"; @@ -36,21 +32,20 @@ namespace Umbraco.Core.IO public static string Scripts => IOHelper.ReturnPath("umbracoScriptsPath", "~/scripts"); - public static string StyleSheets => IOHelper.ReturnPath("umbracoStylesheetsPath", "~/css"); + public static string Css => IOHelper.ReturnPath("umbracoCssPath", "~/css"); public static string Umbraco => IOHelper.ReturnPath("umbracoPath", "~/umbraco"); - //TODO: Consider removing this - public static string UserControls => IOHelper.ReturnPath("umbracoUsercontrolsPath", "~/usercontrols"); + //fixme: remove this + [Obsolete("Usercontrols are obsolete and code should be removed")] + public static string UserControls => "~/usercontrols"; + [Obsolete("Only used by legacy load balancing which is obsolete and should be removed")] public static string WebServices => IOHelper.ReturnPath("umbracoWebservicesPath", Umbraco.EnsureEndsWith("/") + "webservices"); - //by default the packages folder should exist in the data folder - public static string Packages => IOHelper.ReturnPath("umbracoPackagesPath", Data + IOHelper.DirSepChar + "packages"); + public static string Packages => Data + IOHelper.DirSepChar + "packages"; - public static string Preview => IOHelper.ReturnPath("umbracoPreviewPath", Data + IOHelper.DirSepChar + "preview"); - - public static string JavaScriptLibrary => IOHelper.ReturnPath("umbracoJavaScriptLibraryPath", Umbraco + IOHelper.DirSepChar + "lib"); + public static string Preview => Data + IOHelper.DirSepChar + "preview"; private static string _root; diff --git a/src/Umbraco.Core/StringExtensions.cs b/src/Umbraco.Core/StringExtensions.cs index 9c686c4353..461b1d3c1e 100644 --- a/src/Umbraco.Core/StringExtensions.cs +++ b/src/Umbraco.Core/StringExtensions.cs @@ -540,7 +540,7 @@ namespace Umbraco.Core public static string StripHtml(this string text) { const string pattern = @"<(.|\n)*?>"; - return Regex.Replace(text, pattern, String.Empty); + return Regex.Replace(text, pattern, string.Empty); } /// diff --git a/src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs b/src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs index cac53e1f99..5ad9140811 100644 --- a/src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs +++ b/src/Umbraco.Core/Sync/ServerSyncWebServiceClient.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Web.Services; using Umbraco.Core.IO; @@ -8,6 +9,7 @@ namespace Umbraco.Core.Sync /// The client Soap service for making distrubuted cache calls between servers /// [WebServiceBinding(Name = "CacheRefresherSoap", Namespace = "http://umbraco.org/webservices/")] + [Obsolete("Legacy load balancing is obsolete and should be removed")] internal class ServerSyncWebServiceClient : System.Web.Services.Protocols.SoapHttpClientProtocol { diff --git a/src/Umbraco.Web/Editors/BackOfficeAssetsController.cs b/src/Umbraco.Web/Editors/BackOfficeAssetsController.cs index eb38957633..cb23e88c9b 100644 --- a/src/Umbraco.Web/Editors/BackOfficeAssetsController.cs +++ b/src/Umbraco.Web/Editors/BackOfficeAssetsController.cs @@ -10,19 +10,13 @@ namespace Umbraco.Web.Editors [PluginController("UmbracoApi")] public class BackOfficeAssetsController : UmbracoAuthorizedJsonController { - private readonly FileSystems _fileSystems; - - public BackOfficeAssetsController(FileSystems fileSystems) - { - _fileSystems = fileSystems; - } + private readonly IFileSystem _jsLibFileSystem = new PhysicalFileSystem(SystemDirectories.Umbraco + IOHelper.DirSepChar + "lib"); [HttpGet] public IEnumerable GetSupportedMomentLocales() { const string momentLocaleFolder = "moment"; - var fileSystem = _fileSystems.JavaScriptLibraryFileSystem; - var cultures = fileSystem.GetFiles(momentLocaleFolder, "*.js").ToList(); + var cultures = _jsLibFileSystem.GetFiles(momentLocaleFolder, "*.js").ToList(); for (var i = 0; i < cultures.Count; i++) { cultures[i] = cultures[i] diff --git a/src/Umbraco.Web/Editors/CodeFileController.cs b/src/Umbraco.Web/Editors/CodeFileController.cs index 7dc797f9de..e995fa50a3 100644 --- a/src/Umbraco.Web/Editors/CodeFileController.cs +++ b/src/Umbraco.Web/Editors/CodeFileController.cs @@ -252,7 +252,7 @@ namespace Umbraco.Web.Editors break; case Core.Constants.Trees.Stylesheets: codeFileDisplay = Mapper.Map(new Stylesheet(string.Empty)); - codeFileDisplay.VirtualPath = SystemDirectories.StyleSheets; + codeFileDisplay.VirtualPath = SystemDirectories.Css; break; default: throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Unsupported editortype"));