summaryrefslogtreecommitdiff
path: root/inc/plugincontroller.class.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2012-09-10 12:40:01 +0200
committerMichael Hamann <michael@content-space.de>2012-09-10 12:40:01 +0200
commit7521090b08245f81410c713f00d3d7fbaf1afda6 (patch)
tree465c3f2854ac868bca6bcb6651e2eb218704eb2f /inc/plugincontroller.class.php
parent30c1351e814dcc13497a61f65fa05a0901d5436a (diff)
downloadrpg-7521090b08245f81410c713f00d3d7fbaf1afda6.tar.gz
rpg-7521090b08245f81410c713f00d3d7fbaf1afda6.tar.bz2
Move plugin name regex to a constant as suggested by @glensc
Diffstat (limited to 'inc/plugincontroller.class.php')
-rw-r--r--inc/plugincontroller.class.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php
index 9d7b51e14..968d47a5c 100644
--- a/inc/plugincontroller.class.php
+++ b/inc/plugincontroller.class.php
@@ -156,7 +156,7 @@ class Doku_Plugin_Controller {
} else {
$all_plugins[$plugin] = 1;
}
- if ($all_plugins[$plugin] == 1 && preg_match('/^[a-zA-Z0-9\x7f-\xff]+$/', $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);
}