summaryrefslogtreecommitdiff
path: root/inc/pageutils.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2011-09-25 09:54:17 +0200
committerAndreas Gohr <andi@splitbrain.org>2011-09-25 09:54:17 +0200
commitb680ea06a64290b3e28a7b7d2d8d33373a3e6709 (patch)
tree60b501fdb1484fae50ca0f0253fb9c1b505372d7 /inc/pageutils.php
parent7e4e38eb0a22e35382c5ef897d7351323e4f4887 (diff)
downloadrpg-b680ea06a64290b3e28a7b7d2d8d33373a3e6709.tar.gz
rpg-b680ea06a64290b3e28a7b7d2d8d33373a3e6709.tar.bz2
fix namespace cleaning FS#2295
This patch applies the correct pagename cleaning to namespaces as well. Namespaces should follow the same rules as pagenames but due to a bug it was possible to have namespaces ending in a underscore. If you used such a namespace it will be inaccessible after applying this patch. You should rename the namespace directory on the filesystem (removing the trailing underscore). You old links will then work automatically again. Rebuilding the search index is recommended.
Diffstat (limited to 'inc/pageutils.php')
-rw-r--r--inc/pageutils.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php
index 81dcb66e7..31b5f9ff9 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -134,6 +134,7 @@ function cleanID($raw_id,$ascii=false,$media=false){
$id = preg_replace('#:+#',':',$id);
$id = ($media ? trim($id,':.-') : trim($id,':._-'));
$id = preg_replace('#:[:\._\-]+#',':',$id);
+ $id = preg_replace('#[:\._\-]+:#',':',$id);
$cache[(string)$raw_id] = $id;
return($id);