removes scripting.config, EnableSplashWhileLoading, RenderingEngine, and more!
This commit is contained in:
@@ -40,9 +40,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
[ConfigurationProperty("XmlContentCheckForDiskChanges")]
|
||||
internal InnerTextConfigurationElement<bool> XmlContentCheckForDiskChanges => GetOptionalTextElement("XmlContentCheckForDiskChanges", false);
|
||||
|
||||
[ConfigurationProperty("EnableSplashWhileLoading")]
|
||||
internal InnerTextConfigurationElement<bool> EnableSplashWhileLoading => GetOptionalTextElement("EnableSplashWhileLoading", false);
|
||||
|
||||
[ConfigurationProperty("PropertyContextHelpOption")]
|
||||
internal InnerTextConfigurationElement<string> PropertyContextHelpOption => GetOptionalTextElement("PropertyContextHelpOption", "text");
|
||||
|
||||
@@ -110,8 +107,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
|
||||
bool IContentSection.XmlContentCheckForDiskChanges => XmlContentCheckForDiskChanges;
|
||||
|
||||
bool IContentSection.EnableSplashWhileLoading => EnableSplashWhileLoading;
|
||||
|
||||
string IContentSection.PropertyContextHelpOption => PropertyContextHelpOption;
|
||||
|
||||
bool IContentSection.ForceSafeAliases => ForceSafeAliases;
|
||||
|
||||
@@ -35,8 +35,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
|
||||
bool XmlContentCheckForDiskChanges { get; }
|
||||
|
||||
bool EnableSplashWhileLoading { get; }
|
||||
|
||||
string PropertyContextHelpOption { get; }
|
||||
|
||||
bool ForceSafeAliases { get; }
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Umbraco.Core
|
||||
{
|
||||
public enum RenderingEngine
|
||||
{
|
||||
Unknown,
|
||||
Mvc,
|
||||
WebForms
|
||||
}
|
||||
}
|
||||
@@ -1308,7 +1308,6 @@
|
||||
<Compile Include="PropertyEditors\ValueConverters\UploadPropertyConverter.cs" />
|
||||
<Compile Include="PropertyEditors\ValueConverters\YesNoValueConverter.cs" />
|
||||
<Compile Include="ReflectionUtilities.cs" />
|
||||
<Compile Include="RenderingEngine.cs" />
|
||||
<Compile Include="RuntimeLevel.cs" />
|
||||
<Compile Include="RuntimeState.cs" />
|
||||
<Compile Include="Runtime\CoreRuntimeComposer.cs" />
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Linq;
|
||||
using System.Web.UI;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Core.Cache;
|
||||
using umbraco;
|
||||
|
||||
namespace Umbraco.Tests.Cache
|
||||
{
|
||||
@@ -104,9 +103,9 @@ namespace Umbraco.Tests.Cache
|
||||
[Test]
|
||||
public void Can_Get_By_Search()
|
||||
{
|
||||
var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1");
|
||||
var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2");
|
||||
var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3");
|
||||
var cacheContent1 = new MacroCacheContent();
|
||||
var cacheContent2 = new MacroCacheContent();
|
||||
var cacheContent3 = new MacroCacheContent();
|
||||
var cacheContent4 = new LiteralControl();
|
||||
AppCache.Get("Test1", () => cacheContent1);
|
||||
AppCache.Get("Tester2", () => cacheContent2);
|
||||
@@ -123,9 +122,9 @@ namespace Umbraco.Tests.Cache
|
||||
[Test]
|
||||
public void Can_Clear_By_Expression()
|
||||
{
|
||||
var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1");
|
||||
var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2");
|
||||
var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3");
|
||||
var cacheContent1 = new MacroCacheContent();
|
||||
var cacheContent2 = new MacroCacheContent();
|
||||
var cacheContent3 = new MacroCacheContent();
|
||||
var cacheContent4 = new LiteralControl();
|
||||
AppCache.Get("TTes1t", () => cacheContent1);
|
||||
AppCache.Get("Tester2", () => cacheContent2);
|
||||
@@ -142,9 +141,9 @@ namespace Umbraco.Tests.Cache
|
||||
[Test]
|
||||
public void Can_Clear_By_Search()
|
||||
{
|
||||
var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1");
|
||||
var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2");
|
||||
var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3");
|
||||
var cacheContent1 = new MacroCacheContent();
|
||||
var cacheContent2 = new MacroCacheContent();
|
||||
var cacheContent3 = new MacroCacheContent();
|
||||
var cacheContent4 = new LiteralControl();
|
||||
AppCache.Get("Test1", () => cacheContent1);
|
||||
AppCache.Get("Tester2", () => cacheContent2);
|
||||
@@ -161,9 +160,9 @@ namespace Umbraco.Tests.Cache
|
||||
[Test]
|
||||
public void Can_Clear_By_Key()
|
||||
{
|
||||
var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1");
|
||||
var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2");
|
||||
var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3");
|
||||
var cacheContent1 = new MacroCacheContent();
|
||||
var cacheContent2 = new MacroCacheContent();
|
||||
var cacheContent3 = new MacroCacheContent();
|
||||
var cacheContent4 = new LiteralControl();
|
||||
AppCache.Get("Test1", () => cacheContent1);
|
||||
AppCache.Get("Test2", () => cacheContent2);
|
||||
@@ -181,9 +180,9 @@ namespace Umbraco.Tests.Cache
|
||||
[Test]
|
||||
public void Can_Clear_All_Items()
|
||||
{
|
||||
var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1");
|
||||
var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2");
|
||||
var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3");
|
||||
var cacheContent1 = new MacroCacheContent();
|
||||
var cacheContent2 = new MacroCacheContent();
|
||||
var cacheContent3 = new MacroCacheContent();
|
||||
var cacheContent4 = new LiteralControl();
|
||||
AppCache.Get("Test1", () => cacheContent1);
|
||||
AppCache.Get("Test2", () => cacheContent2);
|
||||
@@ -200,7 +199,7 @@ namespace Umbraco.Tests.Cache
|
||||
[Test]
|
||||
public void Can_Add_When_Not_Available()
|
||||
{
|
||||
var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1");
|
||||
var cacheContent1 = new MacroCacheContent();
|
||||
AppCache.Get("Test1", () => cacheContent1);
|
||||
Assert.AreEqual(1, GetTotalItemCount);
|
||||
}
|
||||
@@ -208,7 +207,7 @@ namespace Umbraco.Tests.Cache
|
||||
[Test]
|
||||
public void Can_Get_When_Available()
|
||||
{
|
||||
var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1");
|
||||
var cacheContent1 = new MacroCacheContent();
|
||||
var result = AppCache.Get("Test1", () => cacheContent1);
|
||||
var result2 = AppCache.Get("Test1", () => cacheContent1);
|
||||
Assert.AreEqual(1, GetTotalItemCount);
|
||||
@@ -218,9 +217,9 @@ namespace Umbraco.Tests.Cache
|
||||
[Test]
|
||||
public void Can_Remove_By_Type_Name()
|
||||
{
|
||||
var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1");
|
||||
var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2");
|
||||
var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3");
|
||||
var cacheContent1 = new MacroCacheContent();
|
||||
var cacheContent2 = new MacroCacheContent();
|
||||
var cacheContent3 = new MacroCacheContent();
|
||||
var cacheContent4 = new LiteralControl();
|
||||
AppCache.Get("Test1", () => cacheContent1);
|
||||
AppCache.Get("Test2", () => cacheContent2);
|
||||
@@ -238,9 +237,9 @@ namespace Umbraco.Tests.Cache
|
||||
[Test]
|
||||
public void Can_Remove_By_Strong_Type()
|
||||
{
|
||||
var cacheContent1 = new MacroCacheContent(new LiteralControl(), "Test1");
|
||||
var cacheContent2 = new MacroCacheContent(new LiteralControl(), "Test2");
|
||||
var cacheContent3 = new MacroCacheContent(new LiteralControl(), "Test3");
|
||||
var cacheContent1 = new MacroCacheContent();
|
||||
var cacheContent2 = new MacroCacheContent();
|
||||
var cacheContent3 = new MacroCacheContent();
|
||||
var cacheContent4 = new LiteralControl();
|
||||
AppCache.Get("Test1", () => cacheContent1);
|
||||
AppCache.Get("Test2", () => cacheContent2);
|
||||
@@ -253,5 +252,10 @@ namespace Umbraco.Tests.Cache
|
||||
|
||||
Assert.AreEqual(1, GetTotalItemCount);
|
||||
}
|
||||
|
||||
//just used for these tests
|
||||
private class MacroCacheContent
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,11 +130,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
{
|
||||
Assert.IsTrue(SettingsSection.Content.XmlContentCheckForDiskChanges);
|
||||
}
|
||||
[Test]
|
||||
public void EnableSplashWhileLoading()
|
||||
{
|
||||
Assert.IsFalse(SettingsSection.Content.EnableSplashWhileLoading);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PropertyContextHelpOption()
|
||||
{
|
||||
|
||||
@@ -97,7 +97,6 @@ namespace Umbraco.Tests.Routing
|
||||
var frequest = publishedRouter.CreateRequest(umbracoContext);
|
||||
frequest.PublishedContent = umbracoContext.ContentCache.GetById(1174);
|
||||
frequest.TemplateModel = template;
|
||||
frequest.RenderingEngine = RenderingEngine.Mvc;
|
||||
|
||||
var handler = new RenderRouteHandler(umbracoContext, new TestControllerFactory(umbracoContext, Mock.Of<ILogger>()));
|
||||
|
||||
|
||||
@@ -206,15 +206,6 @@
|
||||
<DependentUpon>tinyMceConfig.config</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Config\scripting.Release.config">
|
||||
<DependentUpon>scripting.config</DependentUpon>
|
||||
</None>
|
||||
<None Include="Config\Dashboard.Release.config">
|
||||
<DependentUpon>Dashboard.config</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
<None Include="Config\feedProxy.Release.config">
|
||||
<DependentUpon>feedProxy.config</DependentUpon>
|
||||
</None>
|
||||
<Content Include="Umbraco\Install\Views\Index.cshtml" />
|
||||
<Content Include="Media\Web.config" />
|
||||
<Content Include="Properties\Settings.settings">
|
||||
@@ -249,7 +240,6 @@
|
||||
<Content Include="Config\ClientDependency.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Config\scripting.config" />
|
||||
<Content Include="Umbraco\Views\Default.cshtml" />
|
||||
<Content Include="Umbraco\PartialViewMacros\Templates\EditProfile.cshtml" />
|
||||
<Content Include="Umbraco\PartialViewMacros\Templates\Empty.cshtml" />
|
||||
@@ -307,10 +297,6 @@
|
||||
<None Include="web.Template.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<Content Include="Config\Dashboard.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Config\404handlers.config" />
|
||||
<Content Include="Config\tinyMceConfig.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<microsoft.scripting>
|
||||
<languages>
|
||||
<language names="IronPython;Python;py" extensions=".py" displayName="IronPython 2.6" type="IronPython.Runtime.PythonContext, IronPython, Version=2.6.10920.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<language names="IronRuby;Ruby;rb" extensions=".rb" displayName="IronRuby 1.0" type="IronRuby.Runtime.RubyContext, IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</languages>
|
||||
|
||||
<options>
|
||||
<set language="Ruby" option="LibraryPaths" value="..\..\Languages\Ruby\libs\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\site_ruby\1.8\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\site_ruby\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\1.8\" />
|
||||
</options>
|
||||
</microsoft.scripting>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<microsoft.scripting>
|
||||
<languages>
|
||||
<language names="IronPython;Python;py" extensions=".py" displayName="IronPython 2.6" type="IronPython.Runtime.PythonContext, IronPython, Version=2.6.10920.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<language names="IronRuby;Ruby;rb" extensions=".rb" displayName="IronRuby 1.0" type="IronRuby.Runtime.RubyContext, IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</languages>
|
||||
|
||||
<options>
|
||||
<set language="Ruby" option="LibraryPaths" value="..\..\Languages\Ruby\libs\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\site_ruby\1.8\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\site_ruby\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\1.8\" />
|
||||
</options>
|
||||
</microsoft.scripting>
|
||||
@@ -8,7 +8,6 @@
|
||||
-->
|
||||
|
||||
<configSections>
|
||||
<section name="microsoft.scripting" type="Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" />
|
||||
<section name="clientDependency" type="ClientDependency.Core.Config.ClientDependencySection, ClientDependency.Core" requirePermission="false" />
|
||||
|
||||
<sectionGroup name="umbracoConfiguration">
|
||||
@@ -30,7 +29,6 @@
|
||||
<HealthChecks configSource="config\HealthChecks.config" />
|
||||
</umbracoConfiguration>
|
||||
|
||||
<microsoft.scripting configSource="config\scripting.config" />
|
||||
<clientDependency configSource="config\ClientDependency.config" />
|
||||
|
||||
<appSettings>
|
||||
|
||||
@@ -102,8 +102,7 @@ namespace Umbraco.Web.Cache
|
||||
if (payloads.Any(x => x.ChangeTypes.HasType(TreeChangeTypes.RefreshAll)) || publishedChanged)
|
||||
{
|
||||
// when a public version changes
|
||||
Current.AppCaches.ClearPartialViewCache();
|
||||
MacroCacheRefresher.ClearMacroContentCache(AppCaches); // just the content
|
||||
AppCaches.ClearPartialViewCache();
|
||||
}
|
||||
|
||||
base.Refresh(payloads);
|
||||
@@ -160,7 +159,6 @@ namespace Umbraco.Web.Cache
|
||||
// simple for now, just clear the whole thing
|
||||
|
||||
appCaches.ClearPartialViewCache();
|
||||
MacroCacheRefresher.ClearMacroContentCache(appCaches); // just the content
|
||||
|
||||
appCaches.IsolatedCaches.ClearCache<PublicAccessEntry>();
|
||||
appCaches.IsolatedCaches.ClearCache<IContent>();
|
||||
|
||||
@@ -37,9 +37,6 @@ namespace Umbraco.Web.Cache
|
||||
|
||||
ClearAllIsolatedCacheByEntityType<IMacro>();
|
||||
|
||||
//TODO: WB Was I too aggresive with cleanup?
|
||||
AppCaches.RuntimeCache.ClearOfType<MacroCacheContent>();
|
||||
|
||||
base.RefreshAll();
|
||||
}
|
||||
|
||||
@@ -111,12 +108,6 @@ namespace Umbraco.Web.Cache
|
||||
return GetAllMacroCacheKeys().Select(x => x + alias).ToArray();
|
||||
}
|
||||
|
||||
public static void ClearMacroContentCache(AppCaches appCaches)
|
||||
{
|
||||
//TODO: WB Was I too aggresive with cleanup?
|
||||
appCaches.RuntimeCache.ClearOfType<MacroCacheContent>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,11 +154,7 @@ namespace Umbraco.Web.Editors
|
||||
break;
|
||||
|
||||
default:
|
||||
//Throw error
|
||||
return new HttpResponseMessage(HttpStatusCode.Unauthorized)
|
||||
{
|
||||
Content = new StringContent($"The Site {site} and {url} is not on the whitelist"),
|
||||
};
|
||||
return new HttpResponseMessage(HttpStatusCode.NotFound);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -347,9 +347,6 @@ namespace Umbraco.Web.Mvc
|
||||
// to Mvc since Mvc can't do much
|
||||
return new PublishedContentNotFoundHandler("In addition, no template exists to render the custom 404.");
|
||||
|
||||
if (request.RenderingEngine != RenderingEngine.Mvc) // else ?
|
||||
return new PublishedContentNotFoundHandler("In addition, no rendering engine exists to render the custom 404.");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,8 +30,6 @@ namespace Umbraco.Web.Mvc
|
||||
|
||||
var routeDef = (RouteDefinition)context.RouteData.DataTokens[Umbraco.Core.Constants.Web.UmbracoRouteDefinitionDataToken];
|
||||
|
||||
if (routeDef.PublishedRequest.RenderingEngine == RenderingEngine.Mvc)
|
||||
{
|
||||
var factory = ControllerBuilder.Current.GetControllerFactory();
|
||||
context.RouteData.Values["action"] = routeDef.ActionName;
|
||||
ControllerBase controller = null;
|
||||
@@ -49,7 +47,6 @@ namespace Umbraco.Web.Mvc
|
||||
CleanupController(controller, factory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes the controller action
|
||||
|
||||
@@ -6,10 +6,8 @@ using System.Web;
|
||||
using umbraco;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
using RenderingEngine = Umbraco.Core.RenderingEngine;
|
||||
|
||||
namespace Umbraco.Web.Routing
|
||||
{
|
||||
@@ -24,7 +22,6 @@ namespace Umbraco.Web.Routing
|
||||
private bool _readonly; // after prepared
|
||||
private bool _readonlyUri; // after preparing
|
||||
private Uri _uri; // clean uri, no virtual dir, no trailing slash nor .aspx, nothing
|
||||
private ITemplate _template; // template model if any else null
|
||||
private bool _is404;
|
||||
private DomainAndUri _domain;
|
||||
private CultureInfo _culture;
|
||||
@@ -43,7 +40,6 @@ namespace Umbraco.Web.Routing
|
||||
UmbracoContext = umbracoContext ?? throw new ArgumentNullException(nameof(umbracoContext));
|
||||
_publishedRouter = publishedRouter ?? throw new ArgumentNullException(nameof(publishedRouter));
|
||||
Uri = uri ?? umbracoContext.CleanedUmbracoUrl;
|
||||
RenderingEngine = RenderingEngine.Unknown;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -174,8 +170,7 @@ namespace Umbraco.Web.Routing
|
||||
// else
|
||||
|
||||
// save
|
||||
var template = _template;
|
||||
var renderingEngine = RenderingEngine;
|
||||
var template = TemplateModel;
|
||||
|
||||
// set published content - this resets the template, and sets IsInternalRedirect to false
|
||||
PublishedContent = content;
|
||||
@@ -185,8 +180,7 @@ namespace Umbraco.Web.Routing
|
||||
if (isInternalRedirect && Current.Configs.Settings().WebRouting.InternalRedirectPreservesTemplate)
|
||||
{
|
||||
// restore
|
||||
_template = template;
|
||||
RenderingEngine = renderingEngine;
|
||||
TemplateModel = template;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,26 +228,12 @@ namespace Umbraco.Web.Routing
|
||||
/// <summary>
|
||||
/// Gets or sets the template model to use to display the requested content.
|
||||
/// </summary>
|
||||
internal ITemplate TemplateModel
|
||||
{
|
||||
get
|
||||
{
|
||||
return _template;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_template = value;
|
||||
RenderingEngine = RenderingEngine.Unknown; // reset
|
||||
if (_template != null)
|
||||
RenderingEngine = _publishedRouter.FindTemplateRenderingEngine(_template.Alias);
|
||||
}
|
||||
}
|
||||
internal ITemplate TemplateModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the alias of the template to use to display the requested content.
|
||||
/// </summary>
|
||||
public string TemplateAlias => _template?.Alias;
|
||||
public string TemplateAlias => TemplateModel?.Alias;
|
||||
|
||||
/// <summary>
|
||||
/// Tries to set the template to use to display the requested content.
|
||||
@@ -309,7 +289,7 @@ namespace Umbraco.Web.Routing
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the content request has a template.
|
||||
/// </summary>
|
||||
public bool HasTemplate => _template != null;
|
||||
public bool HasTemplate => TemplateModel != null;
|
||||
|
||||
internal void UpdateOnMissingTemplate()
|
||||
{
|
||||
@@ -361,15 +341,6 @@ namespace Umbraco.Web.Routing
|
||||
|
||||
#endregion
|
||||
|
||||
#region Rendering
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether the rendering engine is MVC or WebForms.
|
||||
/// </summary>
|
||||
public RenderingEngine RenderingEngine { get; internal set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Status
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -15,7 +15,6 @@ using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Security;
|
||||
using RenderingEngine = Umbraco.Core.RenderingEngine;
|
||||
|
||||
namespace Umbraco.Web.Routing
|
||||
{
|
||||
@@ -365,29 +364,6 @@ namespace Umbraco.Web.Routing
|
||||
|
||||
#region Rendering engine
|
||||
|
||||
/// <summary>
|
||||
/// Finds the rendering engine to use to render a template specified by its alias.
|
||||
/// </summary>
|
||||
/// <param name="alias">The alias of the template.</param>
|
||||
/// <returns>The rendering engine, or Unknown if the template was not found.</returns>
|
||||
internal RenderingEngine FindTemplateRenderingEngine(string alias)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(alias))
|
||||
return RenderingEngine.Unknown;
|
||||
|
||||
alias = alias.Replace('\\', '/'); // forward slashes only
|
||||
|
||||
// NOTE: we could start with what's the current default?
|
||||
|
||||
// TODO: bad - we probably should be using the appropriate filesystems!
|
||||
|
||||
if (FindTemplateRenderingEngineInDirectory(new DirectoryInfo(IOHelper.MapPath(SystemDirectories.MvcViews)),
|
||||
alias, new[] { ".cshtml", ".vbhtml" }))
|
||||
return RenderingEngine.Mvc;
|
||||
|
||||
return RenderingEngine.Unknown;
|
||||
}
|
||||
|
||||
internal bool FindTemplateRenderingEngineInDirectory(DirectoryInfo directory, string alias, string[] extensions)
|
||||
{
|
||||
if (directory == null || directory.Exists == false)
|
||||
|
||||
@@ -136,9 +136,6 @@ namespace Umbraco.Web.Templates
|
||||
//var queryString = _umbracoContext.HttpContext.Request.QueryString.AllKeys
|
||||
// .ToDictionary(key => key, key => context.Request.QueryString[key]);
|
||||
|
||||
switch (request.RenderingEngine)
|
||||
{
|
||||
case RenderingEngine.Mvc:
|
||||
var requestContext = new RequestContext(_umbracoContext.HttpContext, new RouteData()
|
||||
{
|
||||
Route = RouteTable.Routes["Umbraco_default"]
|
||||
@@ -155,12 +152,6 @@ namespace Umbraco.Web.Templates
|
||||
var stringOutput = RenderUmbracoRequestToString(requestContext);
|
||||
|
||||
sw.Write(stringOutput);
|
||||
break;
|
||||
case RenderingEngine.WebForms:
|
||||
default:
|
||||
throw new Exception("We no longer support WebForms in Umbraco");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -261,7 +261,6 @@
|
||||
<Compile Include="Trees\TreeCollection.cs" />
|
||||
<Compile Include="UI\JavaScript\ClientDependencyConfiguration.cs" />
|
||||
<Compile Include="Editors\Binders\BlueprintItemBinder.cs" />
|
||||
<Compile Include="umbraco.presentation\MacroCacheContent.cs" />
|
||||
<Compile Include="UmbracoApplicationBase.cs" />
|
||||
<Compile Include="WebApi\HttpActionContextExtensions.cs" />
|
||||
<Compile Include="Models\ContentEditing\IContentSave.cs" />
|
||||
|
||||
@@ -270,12 +270,12 @@ namespace Umbraco.Web
|
||||
ReportRuntime(level, "Umbraco is booting.");
|
||||
|
||||
// let requests pile up and wait for 10s then show the splash anyway
|
||||
if (Current.Configs.Settings().Content.EnableSplashWhileLoading == false
|
||||
&& ((RuntimeState) _runtime).WaitForRunLevel(TimeSpan.FromSeconds(10))) return true;
|
||||
//fixme: Do we want this for some insane reason? no other site in history has this
|
||||
if (((RuntimeState) _runtime).WaitForRunLevel(TimeSpan.FromSeconds(10))) return true;
|
||||
|
||||
// redirect to booting page
|
||||
httpContext.Response.StatusCode = 503; // temp not available
|
||||
const string bootUrl = "~/config/splashes/booting.aspx";
|
||||
const string bootUrl = "~/config/splashes/booting.aspx"; //fixme: remove booting.aspx once the above question is resolved
|
||||
httpContext.Response.AddHeader("Retry-After", debug ? "1" : "30"); // seconds
|
||||
httpContext.RewritePath(UriUtility.ToAbsolute(bootUrl) + "?url=" + HttpUtility.UrlEncode(uri.ToString()));
|
||||
return false; // cannot serve content
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace umbraco
|
||||
{
|
||||
public class MacroCacheContent
|
||||
{
|
||||
private readonly Control _control;
|
||||
private readonly string _id;
|
||||
|
||||
[Obsolete("TODO: WB This seems legacy as we reference WebForms Control type", false)]
|
||||
public MacroCacheContent(Control control, string ID)
|
||||
{
|
||||
_control = control;
|
||||
_id = ID;
|
||||
}
|
||||
|
||||
public string ID
|
||||
{
|
||||
get { return _id; }
|
||||
}
|
||||
|
||||
public Control Content
|
||||
{
|
||||
get { return _control; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user