(bug 22940) Namespace aliases to the main namespace don't work. Patch by quietust
authorRoan Kattouw <catrope@users.mediawiki.org>
Fri, 26 Mar 2010 20:55:55 +0000 (20:55 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Fri, 26 Mar 2010 20:55:55 +0000 (20:55 +0000)
CREDITS
RELEASE-NOTES
includes/Title.php

diff --git a/CREDITS b/CREDITS
index 27ec75f..31403d6 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -110,6 +110,7 @@ following names for their contribution to the product.
 * Olaf Lenz
 * Paul Copperman
 * PieRRoMaN
+* quietust
 * RenĂ© Kijewski
 * Robert Treat
 * RockMFR
index 9a3333a..02346e3 100644 (file)
@@ -57,6 +57,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 19270) Relative URIs in interwiki links break interwiki transclusion
 * (bug 22903) Revdelete log entries now show in the user preferred language.
 * (bug 22905) Correctly handle <abbr> followed by ISBN
+* (bug 22940) Namespace aliases pointing to main namespace don't work
 
 == API changes in 1.17 ==
 * (bug 22738) Allow filtering by action type on query=logevent
index 011f21a..ea5373c 100644 (file)
@@ -2440,7 +2440,7 @@ class Title {
                        $m = array();
                        if ( preg_match( $prefixRegexp, $dbkey, $m ) ) {
                                $p = $m[1];
-                               if ( $ns = $wgContLang->getNsIndex( $p ) ) {
+                               if ( ( $ns = $wgContLang->getNsIndex( $p ) ) !== false ) {
                                        # Ordinary namespace
                                        $dbkey = $m[2];
                                        $this->mNamespace = $ns;