r49332 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49331‎ | r49332 | r49333 >
Date:08:53, 9 April 2009
Author:ialex
Status:ok
Tags:
Comment:
* removed useless $wgUser and $wgOut globalisation
* fix for r49324: work arround E_STRICT: only variables should be passed by reference (OutputPage::getTitle() doesn't return a reference but OutputPage::addWikiTextTitle() want one)
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/skins/CologneBlue.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/CologneBlue.php
@@ -123,7 +123,7 @@
124124 }
125125
126126 function sysLinks() {
127 - global $wgUser, $wgLang, $wgContLang, $wgOut;
 127+ global $wgUser, $wgLang, $wgContLang;
128128 $li = $wgContLang->specialPage( 'Userlogin' );
129129 $lo = $wgContLang->specialPage( 'Userlogout' );
130130
Index: trunk/phase3/includes/OutputPage.php
@@ -517,7 +517,8 @@
518518 * @param bool $linestart
519519 */
520520 public function addWikiText( $text, $linestart = true ) {
521 - $this->addWikiTextTitle( $text, $this->getTitle(), $linestart );
 521+ $title = $this->getTitle(); // Work arround E_STRICT
 522+ $this->addWikiTextTitle( $text, $title, $linestart );
522523 }
523524
524525 public function addWikiTextWithTitle($text, &$title, $linestart = true) {
@@ -625,7 +626,7 @@
626627 * @deprecated Use Article::outputWikitext
627628 */
628629 public function addPrimaryWikiText( $text, $article, $cache = true ) {
629 - global $wgParser, $wgUser;
 630+ global $wgParser;
630631
631632 wfDeprecated( __METHOD__ );
632633
@@ -1032,7 +1033,7 @@
10331034 */
10341035 public static function setEncodings() {
10351036 global $wgInputEncoding, $wgOutputEncoding;
1036 - global $wgUser, $wgContLang;
 1037+ global $wgContLang;
10371038
10381039 $wgInputEncoding = strtolower( $wgInputEncoding );
10391040
@@ -1190,7 +1191,7 @@
11911192 * @param string $permission key required
11921193 */
11931194 public function permissionRequired( $permission ) {
1194 - global $wgUser, $wgLang;
 1195+ global $wgLang;
11951196
11961197 $this->setPageTitle( wfMsg( 'badaccess' ) );
11971198 $this->setHTMLTitle( wfMsg( 'errorpagetitle' ) );
@@ -1505,7 +1506,7 @@
15061507 public function headElement( Skin $sk ) {
15071508 global $wgDocType, $wgDTD, $wgContLanguageCode, $wgOutputEncoding, $wgMimeType;
15081509 global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces;
1509 - global $wgUser, $wgContLang, $wgUseTrackbacks, $wgStyleVersion;
 1510+ global $wgContLang, $wgUseTrackbacks, $wgStyleVersion;
15101511
15111512 $this->addMeta( "http:Content-type", "$wgMimeType; charset={$wgOutputEncoding}" );
15121513 $this->addStyle( 'common/wikiprintable.css', 'print' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r49324Stage 2 of war on $wgTitle!! Make OutputPage, Skin and children rely on mTitl...demon02:22, 9 April 2009

Status & tagging log