mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Missing file. Fixed SafeMode theme which was considered disabled in safe mode.
--HG-- branch : dev
This commit is contained in:
@@ -49,7 +49,6 @@ namespace Orchard.Tests.DisplayManagement.Descriptors {
|
||||
};
|
||||
|
||||
builder.RegisterType<TestShapeProvider>().As<IShapeTableProvider>()
|
||||
.WithMetadata("Features", TestFeature())
|
||||
.As<TestShapeProvider>()
|
||||
.InstancePerLifetimeScope();
|
||||
}
|
||||
|
29
src/Orchard.Tests/Stubs/StubExtensionManager.cs
Normal file
29
src/Orchard.Tests/Stubs/StubExtensionManager.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Environment.Extensions.Models;
|
||||
|
||||
namespace Orchard.Tests.Stubs {
|
||||
public class StubExtensionManager : IExtensionManager {
|
||||
public IEnumerable<ExtensionDescriptor> AvailableExtensions() {
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
public IEnumerable<FeatureDescriptor> AvailableFeatures() {
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
public IEnumerable<Feature> LoadFeatures(IEnumerable<FeatureDescriptor> featureDescriptors) {
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
public void InstallExtension(string extensionType, HttpPostedFileBase extensionBundle) {
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
public void UninstallExtension(string extensionType, string extensionName) {
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
@@ -82,7 +82,7 @@ namespace Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy {
|
||||
}
|
||||
|
||||
private bool FeatureIsEnabled(FeatureDescriptor fd) {
|
||||
return (fd.Extension.ExtensionType == "Theme" && fd.Name == "TheAdmin") ||
|
||||
return (fd.Extension.ExtensionType == "Theme" && (fd.Name == "TheAdmin" || fd.Name == "SafeMode")) ||
|
||||
_shellDescriptor.Features.Any(sf => sf.Name == fd.Name);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user