summaryrefslogtreecommitdiff
path: root/inc/plugincontroller.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/plugincontroller.class.php')
-rw-r--r--inc/plugincontroller.class.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php
index 734331c94..968d47a5c 100644
--- a/inc/plugincontroller.class.php
+++ b/inc/plugincontroller.class.php
@@ -70,7 +70,6 @@ class Doku_Plugin_Controller {
//we keep all loaded plugins available in global scope for reuse
global $DOKU_PLUGINS;
- global $lang;
list($plugin,$component) = $this->_splitName($name);
@@ -97,7 +96,7 @@ class Doku_Plugin_Controller {
$dir = $this->get_directory($plugin);
$inf = confToHash(DOKU_PLUGIN."$dir/plugin.info.txt");
if($inf['base'] && $inf['base'] != $plugin){
- msg(sprintf($lang['plugin_install_err'],hsc($plugin),hsc($inf['base'])),-1);
+ msg(sprintf("Plugin installed incorrectly. Rename plugin directory '%s' to '%s'.", hsc($plugin), hsc($inf['base'])), -1);
}
return null;
}
@@ -137,6 +136,7 @@ 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
+ continue;
} elseif (@file_exists(DOKU_PLUGIN.$plugin.'/disabled')) {
// treat this as a default disabled plugin(over-rideable by the plugin manager)
// deprecated 2011-09-10 (usage of disabled files)
@@ -156,6 +156,10 @@ class Doku_Plugin_Controller {
} else {
$all_plugins[$plugin] = 1;
}
+ if ($all_plugins[$plugin] == 1 && preg_match('/^'.DOKU_PLUGIN_NAME_REGEX.'$/', $plugin) !== 1) {
+ msg(sprintf("Plugin name '%s' is not a valid plugin name, only the characters a-z and 0-9 are allowed. ".
+ 'Maybe the plugin has been installed in the wrong directory?', hsc($plugin)), -1);
+ }
}
$this->tmp_plugins = $all_plugins;
if (!file_exists($this->last_local_config_file)) {
@@ -168,7 +172,7 @@ class Doku_Plugin_Controller {
$plugins = array();
foreach($files as $file) {
if(file_exists($file)) {
- @include_once($file);
+ include_once($file);
}
}
return $plugins;