Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/yurii-github/dokuwiki int…
Browse files Browse the repository at this point in the history
…o 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
  • Loading branch information
splitbrain committed Jan 8, 2015
2 parents 508170c + e8b8a40 commit f25cd16
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions inc/plugincontroller.class.php
Expand Up @@ -282,7 +282,7 @@ protected function rebuildLocal() {

/**
* Build the list of plugins and cascade
*
*
*/
protected function loadConfig() {
global $config_cascade;
Expand All @@ -309,25 +309,30 @@ protected function loadConfig() {
*/
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;
}
Expand Down

0 comments on commit f25cd16

Please sign in to comment.