r111612 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111611‎ | r111612 | r111613 >
Date:02:35, 16 February 2012
Author:reedy
Status:ok
Tags:
Comment:
Cleanup a few unused globals
Modified paths:
  • /trunk/phase3/img_auth.php (modified) (history)
  • /trunk/phase3/includes/filerepo/backend/FileBackend.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialListusers.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)
  • /trunk/phase3/maintenance/protect.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/HtmlTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/protect.php
@@ -35,8 +35,6 @@
3636 }
3737
3838 public function execute() {
39 - global $wgUser;
40 -
4139 $userName = $this->getOption( 'u', 'Maintenance script' );
4240 $reason = $this->getOption( 'r', '' );
4341
Index: trunk/phase3/tests/phpunit/includes/HtmlTest.php
@@ -214,8 +214,6 @@
215215 }
216216
217217 function testNamespaceSelector() {
218 - global $wgContLang;
219 -
220218 $this->assertEquals(
221219 '<select id="namespace" name="namespace">' . "\n" .
222220 '<option value="0">(Main)</option>' . "\n" .
Index: trunk/phase3/includes/filerepo/backend/FileBackend.php
@@ -1127,7 +1127,7 @@
11281128
11291129 /**
11301130 * @see FileBackend::getFileStat()
1131 - * @return bool|void
 1131+ * @return bool
11321132 */
11331133 final public function getFileStat( array $params ) {
11341134 wfProfileIn( __METHOD__ );
Index: trunk/phase3/includes/specials/SpecialListusers.php
@@ -157,7 +157,6 @@
158158 $edits = '';
159159 }
160160
161 - global $wgLang;
162161 $userTalkPage = $userPage->getTalkPage();
163162 $talk = ' (' . Linker::link( $userTalkPage, wfMessage( 'talkpagelinktext' )->escaped() ) . ')';
164163
Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -383,7 +383,7 @@
384384 }
385385
386386 function doSubmit() {
387 - global $wgMaximumMovedPages, $wgFixDoubleRedirects, $wgDeleteRevisionsLimit;
 387+ global $wgMaximumMovedPages, $wgFixDoubleRedirects;
388388
389389 $user = $this->getUser();
390390
Index: trunk/phase3/img_auth.php
@@ -43,7 +43,7 @@
4444 wfLogProfilingData();
4545
4646 function wfImageAuthMain() {
47 - global $wgImgAuthPublicTest, $wgRequest, $wgUploadDirectory;
 47+ global $wgImgAuthPublicTest, $wgRequest;
4848
4949 // See if this is a public Wiki (no protections).
5050 if ( $wgImgAuthPublicTest

Status & tagging log