r95171 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95170‎ | r95171 | r95172 >
Date:18:46, 21 August 2011
Author:bawolff
Status:ok (Comments)
Tags:
Comment:
Follow-up r86534 - Do not add tracking categories if we're looking at a special page.

Thank you Nikerabbit for suggesting how to fix.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.18 (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.18
@@ -438,6 +438,7 @@
439439 Windows servers.
440440 * (bug 30074) Moving user JS subpages resulted in JS errors because
441441 #REDIRECT [[Foo]] is invalid JS
 442+* Tracking categories are no longer shown in footer for special pages
442443
443444 === API changes in 1.18 ===
444445 * BREAKING CHANGE: action=watch now requires POST and token.
Index: trunk/phase3/includes/parser/Parser.php
@@ -3956,6 +3956,10 @@
39573957 * @return Boolean: whether the addition was successful
39583958 */
39593959 protected function addTrackingCategory( $msg ) {
 3960+ if ( $this->mTitle->getNamespace() === NS_SPECIAL ) {
 3961+ wfDebug( __METHOD__.": Not adding tracking category $msg to special page!\n" );
 3962+ return false;
 3963+ }
39603964 $cat = wfMsgForContent( $msg );
39613965
39623966 # Allow tracking categories to be disabled by setting them to "-"

Follow-up revisions

RevisionCommit summaryAuthorDate
r95175follow-up r95171 - add unit test for tracking categories.bawolff19:28, 21 August 2011
r964981.18: MFT r95171, r95409, r95436, r95458, r95467, r95470, r95475, r95493, r95...catrope21:04, 7 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86534(bug 23816) Add tracking category for any page with a broken image....bawolff19:43, 20 April 2011

Comments

#Comment by Nikerabbit (talk | contribs)   19:13, 21 August 2011

I'd perhaps use < NS_MAIN. Funnily we also have $title->isSpecialPage().

#Comment by Bawolff (talk | contribs)   19:16, 21 August 2011

I really don't think we're going to be parsing any pages in NS_MEDIA any time soon :P

#Comment by Reedy (talk | contribs)   16:45, 5 October 2011

Should this be 1.18wmf1'd as it's a followup to a 1.18 rev?

#Comment by Bawolff (talk | contribs)   20:33, 5 October 2011

probably "should" be. But its not a major issue as people generally don't have broken images in MW ns. However, wasn't this merged to 1.18 prior to 1.18wmf1 being branched?

#Comment by Reedy (talk | contribs)   21:05, 5 October 2011

Hmm.. Yeah, 1.18wmf1 - 19/9/2011

Status & tagging log