Kill unused globals
authorSam Reed <reedy@users.mediawiki.org>
Mon, 18 Jul 2011 13:14:05 +0000 (13:14 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 18 Jul 2011 13:14:05 +0000 (13:14 +0000)
Remove unreachable return;

includes/specials/SpecialLockdb.php
includes/specials/SpecialMovepage.php
includes/specials/SpecialPasswordReset.php
includes/specials/SpecialUnblock.php
includes/specials/SpecialUploadStash.php

index 4c70df2..5c861b3 100644 (file)
@@ -34,7 +34,7 @@ class SpecialLockdb extends SpecialPage {
        }
 
        public function execute( $par ) {
-               global $wgUser, $wgOut, $wgRequest;
+               global $wgUser, $wgRequest;
 
                $this->setHeaders();
 
index 11095fb..e768255 100644 (file)
@@ -579,7 +579,7 @@ class MovePageForm extends UnlistedSpecialPage {
        }
 
        function showSubpages( $title, $out ) {
-               global $wgUser, $wgLang;
+               global $wgLang;
 
                if( !MWNamespace::hasSubpages( $title->getNamespace() ) )
                        return;
index 191832b..7a29e6d 100644 (file)
@@ -33,8 +33,6 @@ class SpecialPasswordReset extends FormSpecialPage {
        }
 
        public function userCanExecute( User $user ) {
-               global $wgPasswordResetRoutes, $wgAuth;
-
                $error = $this->canChangePassword( $user );
                if ( is_string( $error ) ) {
                        throw new ErrorPageError( 'internalerror', $error );
@@ -243,7 +241,7 @@ class SpecialPasswordReset extends FormSpecialPage {
         * @return Bool
         */
        function isListed() {
-               global $wgPasswordResetRoutes, $wgAuth, $wgUser;
+               global $wgUser;
 
                if ( $this->canChangePassword( $wgUser ) === true ) {
                        return parent::isListed();
index 0d93958..8243582 100644 (file)
@@ -46,7 +46,6 @@ class SpecialUnblock extends SpecialPage {
                # Check for database lock
                if( wfReadOnly() ) {
                        throw new ReadOnlyError;
-                       return;
                }
 
                list( $this->target, $this->type ) = SpecialBlock::getTargetAndType( $par, $wgRequest );
index 59541c1..eae6265 100644 (file)
@@ -333,7 +333,6 @@ class SpecialUploadStash extends UnlistedSpecialPage {
                $form->prepareForm();
                $formResult = $form->tryAuthorizedSubmit();
 
-
                // show the files + form, if there are any, or just say there are none
                $refreshHtml = Html::element( 'a',
                        array( 'href' => $this->getTitle()->getLocalURL() ),