summaryrefslogtreecommitdiff
path: root/inc/plugincontroller.class.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2012-09-08 14:24:10 +0200
committerMichael Hamann <michael@content-space.de>2012-09-08 14:35:24 +0200
commit0484ed6db014e8cd7849224d5b31f7e93ef40539 (patch)
tree4471f6d6b2faeaa157dc71f2871bd43bd9320bc3 /inc/plugincontroller.class.php
parenteef93e99be0d44ec6dc4fa86373ba6fd2b8c5f48 (diff)
downloadrpg-0484ed6db014e8cd7849224d5b31f7e93ef40539.tar.gz
rpg-0484ed6db014e8cd7849224d5b31f7e93ef40539.tar.bz2
Display an error message when an enabled plugin has an invalid name
This displays an error message when building the plugin list and an enabled plugin does not follow the plugin naming conventions. This should help plugin developers and admins understand why their plugins aren't working.
Diffstat (limited to 'inc/plugincontroller.class.php')
-rw-r--r--inc/plugincontroller.class.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php
index 21f73f4cb..0d3080250 100644
--- a/inc/plugincontroller.class.php
+++ b/inc/plugincontroller.class.php
@@ -156,6 +156,9 @@ class Doku_Plugin_Controller {
} else {
$all_plugins[$plugin] = 1;
}
+ if ($all_plugins[$plugin] == 1 && preg_match('/^[a-z0-9]+$/', $plugin) !== 1) {
+ msg(sprintf("Plugin name '%s' is not a valid plugin name, only the characters a-z and 0-9 are allowed.", hsc($plugin)), -1);
+ }
}
$this->tmp_plugins = $all_plugins;
if (!file_exists($this->last_local_config_file)) {