#17597: Fixing wrong feature name in notification when enabling/disabling a feature

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-03-30 18:19:14 -07:00
parent 1ad3476de9
commit eb7dc83a52

View File

@@ -72,7 +72,8 @@ namespace Orchard.Modules.Services {
/// <param name="force">Boolean parameter indicating if the feature should enable it's dependencies if required or fail otherwise.</param>
public void EnableFeatures(IEnumerable<string> featureIds, bool force) {
foreach (string featureId in _featureManager.EnableFeatures(featureIds, force)) {
Services.Notifier.Information(T("{0} was enabled", featureId));
var featureName = _featureManager.GetAvailableFeatures().Where(f => f.Id == featureId).First().Name;
Services.Notifier.Information(T("{0} was enabled", featureName));
}
}
@@ -91,7 +92,8 @@ namespace Orchard.Modules.Services {
/// <param name="force">Boolean parameter indicating if the feature should disable the features which depend on it if required or fail otherwise.</param>
public void DisableFeatures(IEnumerable<string> featureIds, bool force) {
foreach (string featureId in _featureManager.DisableFeatures(featureIds, force)) {
Services.Notifier.Information(T("{0} was disabled", featureId));
var featureName = _featureManager.GetAvailableFeatures().Where(f => f.Id == featureId).First().Name;
Services.Notifier.Information(T("{0} was disabled", featureName));
}
}