Missing file. Fixed SafeMode theme which was considered disabled in safe mode.

--HG--
branch : dev
This commit is contained in:
Dave Reed
2010-10-12 13:04:44 -07:00
parent 7811d4fcdd
commit dd2294935e
3 changed files with 30 additions and 2 deletions

View File

@@ -49,7 +49,6 @@ namespace Orchard.Tests.DisplayManagement.Descriptors {
};
builder.RegisterType<TestShapeProvider>().As<IShapeTableProvider>()
.WithMetadata("Features", TestFeature())
.As<TestShapeProvider>()
.InstancePerLifetimeScope();
}

View 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();
}
}
}

View File

@@ -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);
}