mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge pull request #5694 from dcinzona/patch-2
Fixes #5693 - DisableTheme Part breaks admin theme
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user