r85402 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85401‎ | r85402 | r85403 >
Date:00:01, 5 April 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Kill usage of global $title, non existent in core
Modified paths:
  • /branches/REL1_17/phase3/includes/db/Database.php (modified) (history)

Diff [purge]

Index: branches/REL1_17/phase3/includes/db/Database.php
@@ -2987,7 +2987,7 @@
29882988 }
29892989
29902990 function fileCachedPage() {
2991 - global $wgTitle, $title, $wgLang, $wgOut;
 2991+ global $wgTitle, $wgLang, $wgOut;
29922992
29932993 if ( $wgOut->isDisabled() ) {
29942994 return; // Done already?
@@ -3001,8 +3001,6 @@
30023002
30033003 if ( $wgTitle ) {
30043004 $t =& $wgTitle;
3005 - } elseif ( $title ) {
3006 - $t = Title::newFromURL( $title );
30073005 } else {
30083006 $t = Title::newFromText( $mainpage );
30093007 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79542Remove nasty ancient global $title (at least $wgTitle is easier to grep for),...demon00:42, 4 January 2011

Comments

#Comment by Happy-melon (talk | contribs)   00:03, 5 April 2011

This is half of r79542. Is it worth merging the rest of that rev?

#Comment by Reedy (talk | contribs)   00:05, 5 April 2011

Making it private and the whitespace? Probably not

#Comment by 😂 (talk | contribs)   15:07, 15 April 2011

Obviously you didn't read where I said "Don't backport to 1.17 because this is trivial, harmless, and may Break Something."

Status & tagging log