diff options
author | Adrian Lang <mail@adrianlang.de> | 2011-04-22 22:35:43 +0200 |
---|---|---|
committer | Adrian Lang <mail@adrianlang.de> | 2011-04-22 22:35:43 +0200 |
commit | 8ccf9c9785ec2b626bad30a88a21f02886845418 (patch) | |
tree | 0ecd6103880e3350bd37ba11ae3872805ede1755 /inc/plugincontroller.class.php | |
parent | e2092379b1c3200832cb569781ec647db5aeef0f (diff) | |
parent | 23d27376b2a2f6a1ccf0777c48435717494d85b1 (diff) | |
download | rpg-8ccf9c9785ec2b626bad30a88a21f02886845418.tar.gz rpg-8ccf9c9785ec2b626bad30a88a21f02886845418.tar.bz2 |
Merge branch 'master' into stable
Conflicts:
data/deleted.files
doku.php
lib/exe/xmlrpc.php
Diffstat (limited to 'inc/plugincontroller.class.php')
-rw-r--r-- | inc/plugincontroller.class.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php index ad394e11f..cec5c73a9 100644 --- a/inc/plugincontroller.class.php +++ b/inc/plugincontroller.class.php @@ -96,7 +96,15 @@ class Doku_Plugin_Controller { //construct class and instantiate $class = $type.'_plugin_'.$name; - if (!class_exists($class)) return null; + if (!class_exists($class)){ + # the plugin might be in the wrong directory + $inf = confToHash(DOKU_PLUGIN."$dir/plugin.info.txt"); + if($inf['base'] && $inf['base'] != $plugin){ + msg("Plugin installed incorrectly. Rename plugin directory '". + hsc($plugin)."' to '".hsc($inf['base'])."'.",-1); + } + return null; + } $DOKU_PLUGINS[$type][$name] = new $class; return $DOKU_PLUGINS[$type][$name]; @@ -125,6 +133,7 @@ class Doku_Plugin_Controller { } function _populateMasterList() { + global $conf; if ($dh = opendir(DOKU_PLUGIN)) { while (false !== ($plugin = readdir($dh))) { if ($plugin[0] == '.') continue; // skip hidden entries @@ -134,7 +143,9 @@ class Doku_Plugin_Controller { // the plugin was disabled by rc2009-01-26 // disabling mechanism was changed back very soon again // to keep everything simple we just skip the plugin completely - }elseif(@file_exists(DOKU_PLUGIN.$plugin.'/disabled')){ + }elseif(@file_exists(DOKU_PLUGIN.$plugin.'/disabled') || + ($plugin === 'plugin' && isset($conf['pluginmanager']) && + !$conf['pluginmanager'])){ $this->list_disabled[] = $plugin; } else { $this->list_enabled[] = $plugin; |