Don't let dependant plugins automatically enable plugins which should be disabled by default
Follow-up tof10440b
andc0a7fdc
This commit is contained in:
parent
c0a7fdc801
commit
a2aa46fd0e
1 changed files with 7 additions and 2 deletions
|
@ -78,8 +78,13 @@ abstract class AbstractPicoPlugin implements PicoPluginInterface
|
|||
if (is_array($pluginConfig) && isset($pluginConfig['enabled'])) {
|
||||
$this->setEnabled($pluginConfig['enabled']);
|
||||
} elseif ($this->enabled) {
|
||||
// make sure dependencies are fulfilled
|
||||
$this->checkDependencies(true);
|
||||
// make sure dependencies are already fulfilled,
|
||||
// otherwise the plugin needs to be enabled manually
|
||||
try {
|
||||
$this->checkDependencies(false);
|
||||
} catch (RuntimeException $e) {
|
||||
$this->enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue