Merge pull request #5694 from dcinzona/patch-2

Fixes #5693 - DisableTheme Part breaks admin theme
This commit is contained in:
Sébastien Ros
2015-08-25 09:56:31 -07:00

View File

@@ -1,7 +1,8 @@
using System.Web;
using System.Web;
using JetBrains.Annotations;
using Orchard.ContentManagement.Drivers;
using Orchard.Themes.Models;
using Orchard.UI.Admin;
namespace Orchard.Themes.Drivers {
[UsedImplicitly]
@@ -13,6 +14,9 @@ namespace Orchard.Themes.Drivers {
}
protected override DriverResult Display(DisableThemePart part, string displayType, dynamic shapeHelper) {
if (AdminFilter.IsApplied(_httpContext.Request.RequestContext)) {
return null;
}
return ContentShape("Parts_DisableTheme", () => {
ThemeFilter.Disable(_httpContext.Request.RequestContext);
return null;
@@ -20,4 +24,4 @@ namespace Orchard.Themes.Drivers {
}
}
}
}