Skip to content
Snippets Groups Projects
Commit ce7fb7d7 authored by Michael Hamann's avatar Michael Hamann
Browse files

Only complain about invalid plugin names when plugins are loaded FS#2595

This fixes error messages about invalid plugin names for directories in
the plugin directory which didn't contain any plugin. Now the message is
only displayed for plugins which couldn't be loaded because of the
invalid name.
parent 19e77bae
No related branches found
No related tags found
No related merge requests found
......@@ -97,6 +97,9 @@ class Doku_Plugin_Controller {
$inf = confToHash(DOKU_PLUGIN."$dir/plugin.info.txt");
if($inf['base'] && $inf['base'] != $plugin){
msg(sprintf("Plugin installed incorrectly. Rename plugin directory '%s' to '%s'.", hsc($plugin), hsc($inf['base'])), -1);
} elseif (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);
}
return null;
}
......@@ -156,10 +159,6 @@ 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)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment