浏览代码

Don't always check dependants of a disabled plugin

This isn't necessary because dependant plugins will check their dependencies on their own. Follow-up to f10440b
Daniel Rudolf 9 年之前
父节点
当前提交
c0a7fdc
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      lib/AbstractPicoPlugin.php

+ 3 - 3
lib/AbstractPicoPlugin.php

@@ -77,9 +77,9 @@ abstract class AbstractPicoPlugin implements PicoPluginInterface
                 $pluginConfig = $this->getConfig(get_called_class());
                 if (is_array($pluginConfig) && isset($pluginConfig['enabled'])) {
                     $this->setEnabled($pluginConfig['enabled']);
-                } else {
-                    // make sure dependencies are checked
-                    $this->setEnabled($this->enabled, true, true);
+                } elseif ($this->enabled) {
+                    // make sure dependencies are fulfilled
+                    $this->checkDependencies(true);
                 }
             }
         }