From 01d7f48a69d604df48fdc409199bc122b2c8bc54 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 28 Aug 2005 23:39:18 +0000 Subject: [PATCH] * Fix interlanguage links on special pages when extra namespaces configured --- RELEASE-NOTES | 1 + includes/Namespace.php | 10 ++-------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 907a1e3047..d8a2c13d72 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/Namespace.php b/includes/Namespace.php index 8466137427..a95b7cc398 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -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 } /** -- 2.20.1