summaryrefslogtreecommitdiff
path: root/classes/pluginhost.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2015-10-08 17:02:32 +0300
committerAndrew Dolgov <[email protected]>2015-10-08 17:02:32 +0300
commit583f163f40852c8067708a0a69e38e9c27318179 (patch)
tree93b0716eed460625c8fc004b8438a243c7f76eb4 /classes/pluginhost.php
parent9cc29abd41aa97ca58c3851d1238bbe23d4b9b26 (diff)
don't init plugins when loading everything to make a list, duh
Diffstat (limited to 'classes/pluginhost.php')
-rw-r--r--classes/pluginhost.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/classes/pluginhost.php b/classes/pluginhost.php
index 75620a191..0f3d8f37c 100644
--- a/classes/pluginhost.php
+++ b/classes/pluginhost.php
@@ -133,7 +133,7 @@ class PluginHost {
return array();
}
}
- function load_all($kind, $owner_uid = false) {
+ function load_all($kind, $owner_uid = false, $skip_init = false) {
$plugins = array_merge(glob("plugins/*"), glob("plugins.local/*"));
$plugins = array_filter($plugins, "is_dir");
@@ -141,10 +141,10 @@ class PluginHost {
asort($plugins);
- $this->load(join(",", $plugins), $kind, $owner_uid);
+ $this->load(join(",", $plugins), $kind, $owner_uid, $skip_init);
}
- function load($classlist, $kind, $owner_uid = false) {
+ function load($classlist, $kind, $owner_uid = false, $skip_init = false) {
$plugins = explode(",", $classlist);
$this->owner_uid = (int) $owner_uid;
@@ -181,18 +181,18 @@ class PluginHost {
switch ($kind) {
case $this::KIND_SYSTEM:
if ($this->is_system($plugin)) {
- $plugin->init($this);
+ if (!$skip_init) $plugin->init($this);
$this->register_plugin($class, $plugin);
}
break;
case $this::KIND_USER:
if (!$this->is_system($plugin)) {
- $plugin->init($this);
+ if (!$skip_init) $plugin->init($this);
$this->register_plugin($class, $plugin);
}
break;
case $this::KIND_ALL:
- $plugin->init($this);
+ if (!$skip_init) $plugin->init($this);
$this->register_plugin($class, $plugin);
break;
}