* Fix interlanguage links on special pages when extra namespaces configured
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 28 Aug 2005 23:39:18 +0000 (23:39 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 28 Aug 2005 23:39:18 +0000 (23:39 +0000)
RELEASE-NOTES
includes/Namespace.php

index 907a1e3..d8a2c13 100644 (file)
@@ -69,6 +69,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * Allow filtering of robot edits in Special:Watchlist by stting 
   $wgFilterRobotsWL = true.
 * (bug 2885) More PHP 5.1 fixes: skin, search, log, undelete
+* Fix interlanguage links on special pages when extra namespaces configured
 
 
 === Caveats ===
index 8466137..a95b7cc 100644 (file)
@@ -67,14 +67,8 @@ class Namespace {
         * @return bool
         */
        function isTalk( $index ) {
-               global $wgExtraNamespaces;
-               return ( $index == NS_TALK           || $index == NS_USER_TALK     ||
-                                $index == NS_PROJECT_TALK   || $index == NS_IMAGE_TALK    ||
-                                $index == NS_MEDIAWIKI_TALK || $index == NS_TEMPLATE_TALK ||
-                                $index == NS_HELP_TALK      || $index == NS_CATEGORY_TALK
-                                ||  ( (isset($wgExtraNamespaces) && $index % 2) )
-                                );
-
+               return ($index > 0)  // Special namespaces are negative
+                       && ($index % 2); // Talk namespaces are odd-numbered
        }
 
        /**