mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
Added a "Disabled" option for all extension loaders
--HG-- branch : dev
This commit is contained in:
@@ -41,6 +41,7 @@ namespace Orchard.Environment.Extensions.Loaders {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ILogger Logger { get; set; }
|
public ILogger Logger { get; set; }
|
||||||
|
public bool Disabled { get; set; }
|
||||||
|
|
||||||
public override int Order { get { return 100; } }
|
public override int Order { get { return 100; } }
|
||||||
|
|
||||||
@@ -146,6 +147,9 @@ namespace Orchard.Environment.Extensions.Loaders {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override ExtensionProbeEntry Probe(ExtensionDescriptor descriptor) {
|
public override ExtensionProbeEntry Probe(ExtensionDescriptor descriptor) {
|
||||||
|
if (Disabled)
|
||||||
|
return null;
|
||||||
|
|
||||||
string projectPath = GetProjectPath(descriptor);
|
string projectPath = GetProjectPath(descriptor);
|
||||||
if (projectPath == null)
|
if (projectPath == null)
|
||||||
return null;
|
return null;
|
||||||
@@ -159,6 +163,9 @@ namespace Orchard.Environment.Extensions.Loaders {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override ExtensionEntry LoadWorker(ExtensionDescriptor descriptor) {
|
protected override ExtensionEntry LoadWorker(ExtensionDescriptor descriptor) {
|
||||||
|
if (Disabled)
|
||||||
|
return null;
|
||||||
|
|
||||||
string projectPath = GetProjectPath(descriptor);
|
string projectPath = GetProjectPath(descriptor);
|
||||||
if (projectPath == null)
|
if (projectPath == null)
|
||||||
return null;
|
return null;
|
||||||
|
Reference in New Issue
Block a user