From e15cb2b9dbc3effbf6bf9f4f3aeef5e1bcbc3816 Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Sun, 21 Aug 2011 18:46:01 +0000 Subject: [PATCH] Follow-up r86534 - Do not add tracking categories if we're looking at a special page. Thank you Nikerabbit for suggesting how to fix. --- RELEASE-NOTES-1.18 | 1 + includes/parser/Parser.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/RELEASE-NOTES-1.18 b/RELEASE-NOTES-1.18 index abda92c569..04fa698a54 100644 --- a/RELEASE-NOTES-1.18 +++ b/RELEASE-NOTES-1.18 @@ -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. diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 1c96fc4007..3233fbf6b7 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -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 "-" -- 2.20.1