mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Correcting disabling feature from command line
- http://orchard.codeplex.com/workitem/16524 --HG-- branch : dev
This commit is contained in:
@@ -79,7 +79,7 @@ namespace Orchard.Modules.Commands {
|
||||
[CommandName("feature disable")]
|
||||
public void Disable(params string[] featureNames) {
|
||||
Context.Output.WriteLine(T("Disabling features {0}", string.Join(",", featureNames)));
|
||||
_moduleService.DisableFeatures(featureNames);
|
||||
_moduleService.DisableFeatures(featureNames, true);
|
||||
Context.Output.WriteLine(T("Disabled features {0}", string.Join(",", featureNames)));
|
||||
}
|
||||
}
|
||||
|
@@ -95,9 +95,10 @@ namespace Orchard.Modules.Services {
|
||||
public void DisableFeatures(IEnumerable<string> features, bool force) {
|
||||
var shellDescriptor = _shellDescriptorManager.GetShellDescriptor();
|
||||
var enabledFeatures = shellDescriptor.Features.ToList();
|
||||
var availableFeatures = GetAvailableFeatures().ToList();
|
||||
|
||||
var featuresToDisable =
|
||||
features.Select(s => DisableFeature(s, GetAvailableFeatures(), force)).SelectMany(
|
||||
features.Select(s => DisableFeature(s, availableFeatures, force)).SelectMany(
|
||||
ies => ies.Select(s => s));
|
||||
|
||||
if (featuresToDisable.Count() == 0)
|
||||
|
Reference in New Issue
Block a user