Siebrand has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/56930


Change subject: Remove unused local variables
......................................................................

Remove unused local variables

Marked one as FIXME, because I'm not certain if there's maybe some magic
depending on it. Should be removed by someone more familiar with this
code, or a comment should be added on why it must be kept.

Change-Id: I8eb774c2857dcc87404fd8a7e5fb66c5a4c9643e
---
M includes/api/ApiCreateAccount.php
M includes/api/ApiImageRotate.php
M includes/api/ApiQuery.php
3 files changed, 1 insertion(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/30/56930/1

diff --git a/includes/api/ApiCreateAccount.php 
b/includes/api/ApiCreateAccount.php
index 55c60cc..a521346 100644
--- a/includes/api/ApiCreateAccount.php
+++ b/includes/api/ApiCreateAccount.php
@@ -43,8 +43,6 @@
 
                $params = $this->extractRequestParams();
 
-               $result = array();
-
                // Init session if necessary
                if ( session_id() == '' ) {
                        wfSetupSession();
diff --git a/includes/api/ApiImageRotate.php b/includes/api/ApiImageRotate.php
index ebdbedd..5aa41ea 100644
--- a/includes/api/ApiImageRotate.php
+++ b/includes/api/ApiImageRotate.php
@@ -53,16 +53,13 @@
                }
        }
 
-
        public function execute() {
                $params = $this->extractRequestParams();
                $rotation = $params['rotation'];
-               $user = $this->getUser();
 
                $pageSet = $this->getPageSet();
                $pageSet->execute();
 
-               $result = array();
                $result = array();
 
                self::addValues( $result, $pageSet->getInvalidTitles(), 
'invalid', 'title' );
@@ -181,7 +178,6 @@
        }
 
        public function getAllowedParams( $flags = 0 ) {
-               $pageSet = $this->getPageSet();
                $result = array(
                        'rotation' => array(
                                ApiBase::PARAM_TYPE => array( '90', '180', 
'270' ),
diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php
index 7c64996..2c497ef 100644
--- a/includes/api/ApiQuery.php
+++ b/includes/api/ApiQuery.php
@@ -382,6 +382,7 @@
                $modules = $allModules;
                $tmp = $completeModules;
                $wasPosted = $this->getRequest()->wasPosted();
+               // @todo FIXME: Unused local variable?
                $main = $this->getMain();
 
                /** @var $module ApiQueryBase */

-- 
To view, visit https://gerrit.wikimedia.org/r/56930
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8eb774c2857dcc87404fd8a7e5fb66c5a4c9643e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <siebr...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to