* Convert spaces to underscores instead of breaking mysteriously
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 22 Dec 2007 19:46:12 +0000 (19:46 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 22 Dec 2007 19:46:12 +0000 (19:46 +0000)
* (bug 8066) Spaces can't be entered in special page aliases

RELEASE-NOTES
languages/Language.php

index cd5e33f..644ca51 100644 (file)
@@ -262,6 +262,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Fix regression -- missing feed links in sidebar on Special:Recentchanges
 * (bug 12371) Handle more namespace case variants in namespaceDupes.php
 * (bug 12380) Bot-friendly EditPage::spamPage
+* (bug 8066) Spaces can't be entered in special page aliases
 
 == Parser changes in 1.12 ==
 
index 6caee42..c65d9aa 100644 (file)
@@ -2134,6 +2134,13 @@ class Language {
 
                # Replace spaces with underscores in namespace names
                $cache['namespaceNames'] = str_replace( ' ', '_', $cache['namespaceNames'] );
+
+               # And do the same for specialpage aliases. $page is an array.
+               foreach ( $cache['specialPageAliases'] as &$page ) {
+                       $page = str_replace( ' ', '_', $page );
+               }
+               # Decouple the reference to prevent accidental damage
+               unset($page);
                
                # Save to both caches
                self::$mLocalisationCache[$code] = $cache;