#18096: Fixing Setup command

Work Item: 18096

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-12-28 15:10:00 -08:00
parent 9056aac66a
commit f3b8003b4a
2 changed files with 5 additions and 4 deletions

View File

@@ -67,9 +67,9 @@ namespace Orchard.Setup.Services {
public string Setup(SetupContext context) {
string executionId = null;
// The vanilla Orchard distibution has the following features enabled.
if (context.EnabledFeatures == null || context.EnabledFeatures.Count() == 0) {
string[] hardcoded = {
string[] hardcoded = {
// Framework
"Orchard.Framework",
// Core
@@ -79,7 +79,8 @@ namespace Orchard.Setup.Services {
"PackagingServices", "Orchard.Packaging", "Gallery", "Orchard.Recipes",
};
context.EnabledFeatures = hardcoded;
if (context.EnabledFeatures != null) {
context.EnabledFeatures = hardcoded.Union(context.EnabledFeatures).Distinct();
}
var shellSettings = new ShellSettings(_shellSettings);

View File

@@ -62,7 +62,7 @@ namespace Orchard.Setup {
builder.RegisterType<DataServicesProviderFactory>().As<IDataServicesProviderFactory>().InstancePerLifetimeScope();
builder.RegisterType<DefaultCommandManager>().As<ICommandManager>().InstancePerLifetimeScope();
builder.RegisterType<HelpCommand>().As<ICommandHandler>().InstancePerLifetimeScope();
builder.RegisterType<WorkContextAccessor>().As<IWorkContextAccessor>().InstancePerMatchingLifetimeScope("shell");
//builder.RegisterType<WorkContextAccessor>().As<IWorkContextAccessor>().InstancePerMatchingLifetimeScope("shell");
builder.RegisterType<ResourceManager>().As<IResourceManager>().InstancePerLifetimeScope();
builder.RegisterType<ResourceFilter>().As<IFilterProvider>().InstancePerLifetimeScope();
builder.RegisterType<DefaultOrchardShell>().As<IOrchardShell>().InstancePerMatchingLifetimeScope("shell");