From 894650c3f7849790d43bd19695a55e69a069a458 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 9 Apr 2009 08:53:15 +0000 Subject: [PATCH] * 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) --- includes/OutputPage.php | 11 ++++++----- skins/CologneBlue.php | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index a57bf3f96b..0c1f294db1 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -517,7 +517,8 @@ class OutputPage { * @param bool $linestart */ public function addWikiText( $text, $linestart = true ) { - $this->addWikiTextTitle( $text, $this->getTitle(), $linestart ); + $title = $this->getTitle(); // Work arround E_STRICT + $this->addWikiTextTitle( $text, $title, $linestart ); } public function addWikiTextWithTitle($text, &$title, $linestart = true) { @@ -625,7 +626,7 @@ class OutputPage { * @deprecated Use Article::outputWikitext */ public function addPrimaryWikiText( $text, $article, $cache = true ) { - global $wgParser, $wgUser; + global $wgParser; wfDeprecated( __METHOD__ ); @@ -1032,7 +1033,7 @@ class OutputPage { */ public static function setEncodings() { global $wgInputEncoding, $wgOutputEncoding; - global $wgUser, $wgContLang; + global $wgContLang; $wgInputEncoding = strtolower( $wgInputEncoding ); @@ -1190,7 +1191,7 @@ class OutputPage { * @param string $permission key required */ public function permissionRequired( $permission ) { - global $wgUser, $wgLang; + global $wgLang; $this->setPageTitle( wfMsg( 'badaccess' ) ); $this->setHTMLTitle( wfMsg( 'errorpagetitle' ) ); @@ -1505,7 +1506,7 @@ class OutputPage { public function headElement( Skin $sk ) { global $wgDocType, $wgDTD, $wgContLanguageCode, $wgOutputEncoding, $wgMimeType; global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces; - global $wgUser, $wgContLang, $wgUseTrackbacks, $wgStyleVersion; + global $wgContLang, $wgUseTrackbacks, $wgStyleVersion; $this->addMeta( "http:Content-type", "$wgMimeType; charset={$wgOutputEncoding}" ); $this->addStyle( 'common/wikiprintable.css', 'print' ); diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php index f78d8b27fa..e421f535ee 100644 --- a/skins/CologneBlue.php +++ b/skins/CologneBlue.php @@ -123,7 +123,7 @@ class SkinCologneBlue extends Skin { } function sysLinks() { - global $wgUser, $wgLang, $wgContLang, $wgOut; + global $wgUser, $wgLang, $wgContLang; $li = $wgContLang->specialPage( 'Userlogin' ); $lo = $wgContLang->specialPage( 'Userlogout' ); -- 2.20.1