From 8e78fbe32bd663b11f68a72906d339ef580ebb23 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 16 Feb 2012 02:35:48 +0000 Subject: [PATCH] Cleanup a few unused globals --- img_auth.php | 2 +- includes/filerepo/backend/FileBackend.php | 2 +- includes/specials/SpecialListusers.php | 1 - includes/specials/SpecialMovepage.php | 2 +- maintenance/protect.php | 2 -- tests/phpunit/includes/HtmlTest.php | 2 -- 6 files changed, 3 insertions(+), 8 deletions(-) diff --git a/img_auth.php b/img_auth.php index 7b09eb64da..3999bf3e80 100644 --- a/img_auth.php +++ b/img_auth.php @@ -43,7 +43,7 @@ wfImageAuthMain(); wfLogProfilingData(); function wfImageAuthMain() { - global $wgImgAuthPublicTest, $wgRequest, $wgUploadDirectory; + global $wgImgAuthPublicTest, $wgRequest; // See if this is a public Wiki (no protections). if ( $wgImgAuthPublicTest diff --git a/includes/filerepo/backend/FileBackend.php b/includes/filerepo/backend/FileBackend.php index 1904e012cf..e546c96a9a 100644 --- a/includes/filerepo/backend/FileBackend.php +++ b/includes/filerepo/backend/FileBackend.php @@ -1127,7 +1127,7 @@ abstract class FileBackendStore extends FileBackend { /** * @see FileBackend::getFileStat() - * @return bool|void + * @return bool */ final public function getFileStat( array $params ) { wfProfileIn( __METHOD__ ); diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index 0fbe88789b..cddfe017cc 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -157,7 +157,6 @@ class UsersPager extends AlphabeticPager { $edits = ''; } - global $wgLang; $userTalkPage = $userPage->getTalkPage(); $talk = ' (' . Linker::link( $userTalkPage, wfMessage( 'talkpagelinktext' )->escaped() ) . ')'; diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index 5d1370ded5..56217b30f1 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -383,7 +383,7 @@ class MovePageForm extends UnlistedSpecialPage { } function doSubmit() { - global $wgMaximumMovedPages, $wgFixDoubleRedirects, $wgDeleteRevisionsLimit; + global $wgMaximumMovedPages, $wgFixDoubleRedirects; $user = $this->getUser(); diff --git a/maintenance/protect.php b/maintenance/protect.php index 56958ea77e..e772d67ce0 100644 --- a/maintenance/protect.php +++ b/maintenance/protect.php @@ -35,8 +35,6 @@ class Protect extends Maintenance { } public function execute() { - global $wgUser; - $userName = $this->getOption( 'u', 'Maintenance script' ); $reason = $this->getOption( 'r', '' ); diff --git a/tests/phpunit/includes/HtmlTest.php b/tests/phpunit/includes/HtmlTest.php index c3c7646ddd..9e2deb14a9 100644 --- a/tests/phpunit/includes/HtmlTest.php +++ b/tests/phpunit/includes/HtmlTest.php @@ -214,8 +214,6 @@ class HtmlTest extends MediaWikiTestCase { } function testNamespaceSelector() { - global $wgContLang; - $this->assertEquals( '