summaryrefslogtreecommitdiff
path: root/inc/plugincontroller.class.php
diff options
context:
space:
mode:
authorAndreas Gohr <gohr@cosmocode.de>2015-01-08 12:04:50 +0100
committerAndreas Gohr <gohr@cosmocode.de>2015-01-08 12:04:50 +0100
commitf25cd1636fcec40f99f368d9dfb61c0812ed575c (patch)
treed53331df3f4fc9bb567fb8c8f04e0f176d9ce744 /inc/plugincontroller.class.php
parent508170cfb7b7722025748f9a3778cd8cf34fc64e (diff)
parente8b8a4027e0150f75db5ab381b7fee4ed959ea2f (diff)
downloadrpg-f25cd1636fcec40f99f368d9dfb61c0812ed575c.tar.gz
rpg-f25cd1636fcec40f99f368d9dfb61c0812ed575c.tar.bz2
Merge branch 'master' of https://github.com/yurii-github/dokuwiki into yurii-github-master
* 'master' of https://github.com/yurii-github/dokuwiki: fixes FASTCGI_UNEXPECTED_EXIT (error 0xff) in FastCGI/IIS for PHP5.6.x 64bit Conflicts: inc/plugincontroller.class.php
Diffstat (limited to 'inc/plugincontroller.class.php')
-rw-r--r--inc/plugincontroller.class.php21
1 files changed, 13 insertions, 8 deletions
diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php
index ad73e1528..8d20f885d 100644
--- a/inc/plugincontroller.class.php
+++ b/inc/plugincontroller.class.php
@@ -282,7 +282,7 @@ class Doku_Plugin_Controller {
/**
* Build the list of plugins and cascade
- *
+ *
*/
protected function loadConfig() {
global $config_cascade;
@@ -309,25 +309,30 @@ class Doku_Plugin_Controller {
*/
protected function _getListByType($type, $enabled) {
$master_list = $enabled ? array_keys(array_filter($this->tmp_plugins)) : array_keys(array_filter($this->tmp_plugins,array($this,'negate')));
-
$plugins = array();
+
foreach ($master_list as $plugin) {
- $dir = $this->get_directory($plugin);
- if (file_exists(DOKU_PLUGIN."$dir/$type.php")){
+ $basedir = $this->get_directory($plugin);
+ if (file_exists(DOKU_PLUGIN."$basedir/$type.php")){
$plugins[] = $plugin;
- } else {
- if ($dp = @opendir(DOKU_PLUGIN."$dir/$type/")) {
+ continue;
+ }
+
+ $typedir = DOKU_PLUGIN."$basedir/$type/";
+ 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 (is_file(DOKU_PLUGIN."$dir/$type/$component")) {
+ if (is_file($typedir.$component)) {
$plugins[] = $plugin.'_'.substr($component, 0, -4);
}
}
closedir($dp);
}
}
- }
+
+ }//foreach
return $plugins;
}