Follow-up r86534 - Do not add tracking categories if we're looking at a special page.
authorBrian Wolff <bawolff@users.mediawiki.org>
Sun, 21 Aug 2011 18:46:01 +0000 (18:46 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Sun, 21 Aug 2011 18:46:01 +0000 (18:46 +0000)
Thank you Nikerabbit for suggesting how to fix.

RELEASE-NOTES-1.18
includes/parser/Parser.php

index abda92c..04fa698 100644 (file)
@@ -438,6 +438,7 @@ production.
   Windows servers.
 * (bug 30074) Moving user JS subpages resulted in JS errors because
   #REDIRECT [[Foo]] is invalid JS
+* Tracking categories are no longer shown in footer for special pages
 
 === API changes in 1.18 ===
 * BREAKING CHANGE: action=watch now requires POST and token.
index 1c96fc4..3233fbf 100644 (file)
@@ -3956,6 +3956,10 @@ class Parser {
         * @return Boolean: whether the addition was successful
         */
        protected function addTrackingCategory( $msg ) {
+               if ( $this->mTitle->getNamespace() === NS_SPECIAL ) {
+                       wfDebug( __METHOD__.": Not adding tracking category $msg to special page!\n" );
+                       return false;
+               }
                $cat = wfMsgForContent( $msg );
 
                # Allow tracking categories to be disabled by setting them to "-"