mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-03 12:03:51 +08:00
- Some more refactoring, IExtensionManager.AvailableExtensions should be used instead of the obsoleted ActiveExtensions method to query extensions in the system.
- ActiveExtensions will be removed once the HackInstallationGenerator is removed. --HG-- branch : dev
This commit is contained in:
@@ -6,9 +6,10 @@ namespace Orchard.Environment.Extensions {
|
||||
public interface IExtensionManager {
|
||||
IEnumerable<ExtensionDescriptor> AvailableExtensions();
|
||||
IEnumerable<Feature> LoadFeatures(IEnumerable<FeatureDescriptor> featureDescriptors);
|
||||
|
||||
IEnumerable<ExtensionEntry> ActiveExtensions_Obsolete();
|
||||
void InstallExtension(string extensionType, HttpPostedFileBase extensionBundle);
|
||||
void UninstallExtension(string extensionType, string extensionName);
|
||||
|
||||
// Used by the HackInstallationGenerator and will be removed along with it.
|
||||
IEnumerable<ExtensionEntry> ActiveExtensions_Obsolete();
|
||||
}
|
||||
}
|
||||
@@ -52,10 +52,10 @@ namespace Orchard.Mvc.ViewEngines {
|
||||
}
|
||||
|
||||
|
||||
var modules = _extensionManager.ActiveExtensions_Obsolete()
|
||||
.Where(x => x.Descriptor.ExtensionType == "Module");
|
||||
var modules = _extensionManager.AvailableExtensions()
|
||||
.Where(x => x.ExtensionType == "Module");
|
||||
|
||||
var moduleLocations = modules.Select(x => Path.Combine(x.Descriptor.Location, x.Descriptor.Name));
|
||||
var moduleLocations = modules.Select(x => Path.Combine(x.Location, x.Name));
|
||||
var moduleViewEngines = _viewEngineProviders
|
||||
.Select(x => x.CreateModulesViewEngine(new CreateModulesViewEngineParams { VirtualPaths = moduleLocations }));
|
||||
Logger.Debug("Module locations:\r\n\t-{0}", string.Join("\r\n\t-", moduleLocations.ToArray()));
|
||||
|
||||
Reference in New Issue
Block a user