r92429 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92428‎ | r92429 | r92430 >
Date:13:14, 18 July 2011
Author:reedy
Status:ok
Tags:
Comment:
Kill unused globals

Remove unreachable return;
Modified paths:
  • /trunk/phase3/includes/specials/SpecialLockdb.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialPasswordReset.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUnblock.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUploadStash.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUnblock.php
@@ -46,7 +46,6 @@
4747 # Check for database lock
4848 if( wfReadOnly() ) {
4949 throw new ReadOnlyError;
50 - return;
5150 }
5251
5352 list( $this->target, $this->type ) = SpecialBlock::getTargetAndType( $par, $wgRequest );
Index: trunk/phase3/includes/specials/SpecialPasswordReset.php
@@ -33,8 +33,6 @@
3434 }
3535
3636 public function userCanExecute( User $user ) {
37 - global $wgPasswordResetRoutes, $wgAuth;
38 -
3937 $error = $this->canChangePassword( $user );
4038 if ( is_string( $error ) ) {
4139 throw new ErrorPageError( 'internalerror', $error );
@@ -243,7 +241,7 @@
244242 * @return Bool
245243 */
246244 function isListed() {
247 - global $wgPasswordResetRoutes, $wgAuth, $wgUser;
 245+ global $wgUser;
248246
249247 if ( $this->canChangePassword( $wgUser ) === true ) {
250248 return parent::isListed();
Index: trunk/phase3/includes/specials/SpecialLockdb.php
@@ -34,7 +34,7 @@
3535 }
3636
3737 public function execute( $par ) {
38 - global $wgUser, $wgOut, $wgRequest;
 38+ global $wgUser, $wgRequest;
3939
4040 $this->setHeaders();
4141
Index: trunk/phase3/includes/specials/SpecialUploadStash.php
@@ -333,7 +333,6 @@
334334 $form->prepareForm();
335335 $formResult = $form->tryAuthorizedSubmit();
336336
337 -
338337 // show the files + form, if there are any, or just say there are none
339338 $refreshHtml = Html::element( 'a',
340339 array( 'href' => $this->getTitle()->getLocalURL() ),
Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -579,7 +579,7 @@
580580 }
581581
582582 function showSubpages( $title, $out ) {
583 - global $wgUser, $wgLang;
 583+ global $wgLang;
584584
585585 if( !MWNamespace::hasSubpages( $title->getNamespace() ) )
586586 return;

Status & tagging log