r10821 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r10820‎ | r10821 | r10822 >
Date:23:39, 28 August 2005
Author:vibber
Status:old
Tags:
Comment:
* Fix interlanguage links on special pages when extra namespaces configured
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Namespace.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Namespace.php
@@ -67,14 +67,8 @@
6868 * @return bool
6969 */
7070 function isTalk( $index ) {
71 - global $wgExtraNamespaces;
72 - return ( $index == NS_TALK || $index == NS_USER_TALK ||
73 - $index == NS_PROJECT_TALK || $index == NS_IMAGE_TALK ||
74 - $index == NS_MEDIAWIKI_TALK || $index == NS_TEMPLATE_TALK ||
75 - $index == NS_HELP_TALK || $index == NS_CATEGORY_TALK
76 - || ( (isset($wgExtraNamespaces) && $index % 2) )
77 - );
78 -
 71+ return ($index > 0) // Special namespaces are negative
 72+ && ($index % 2); // Talk namespaces are odd-numbered
7973 }
8074
8175 /**
Index: trunk/phase3/RELEASE-NOTES
@@ -69,6 +69,7 @@
7070 * Allow filtering of robot edits in Special:Watchlist by stting
7171 $wgFilterRobotsWL = true.
7272 * (bug 2885) More PHP 5.1 fixes: skin, search, log, undelete
 73+* Fix interlanguage links on special pages when extra namespaces configured
7374
7475
7576 === Caveats ===

Status & tagging log