diff options
author | Andreas Gohr <andi@splitbrain.org> | 2019-04-22 11:15:31 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2019-04-22 11:15:31 +0200 |
commit | c47e666521a91dba7c802073af36cad88c8d9244 (patch) | |
tree | 30b01e15051d43c2ac2e44122c30c7d2e85acd12 | |
parent | c904b9fb5f529f3415ce6520620040a35c3bcef9 (diff) | |
download | dokuwiki-c47e666521a91dba7c802073af36cad88c8d9244.tar.gz dokuwiki-c47e666521a91dba7c802073af36cad88c8d9244.zip |
Minor optimizations in PluginController
-rw-r--r-- | inc/Extension/PluginController.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/Extension/PluginController.php b/inc/Extension/PluginController.php index c559371fc..638fd3946 100644 --- a/inc/Extension/PluginController.php +++ b/inc/Extension/PluginController.php @@ -349,7 +349,7 @@ class PluginController if (is_dir($typedir)) { if ($dp = opendir($typedir)) { while (false !== ($component = readdir($dp))) { - if (substr($component, 0, 1) == '.' || strtolower(substr($component, -4)) != ".php") continue; + if (strpos($component, '.') === 0 || strtolower(substr($component, -4)) !== '.php') continue; if (is_file($typedir . $component)) { $plugins[] = $plugin . '_' . substr($component, 0, -4); } @@ -373,7 +373,7 @@ class PluginController */ protected function splitName($name) { - if (array_search($name, array_keys($this->tmp_plugins)) === false) { + if (!isset($this->masterList[$name])) { return explode('_', $name, 2); } |