Remove various unused variables
authorReedy <reedy@wikimedia.org>
Sat, 7 Nov 2015 21:22:17 +0000 (21:22 +0000)
committerReedy <reedy@wikimedia.org>
Sat, 7 Nov 2015 21:22:17 +0000 (21:22 +0000)
Change-Id: I4b1b20b4126735cb32a80e473fe48d523bcb24d1

includes/api/ApiHelp.php
includes/api/ApiParamInfo.php
includes/api/ApiParse.php
includes/api/ApiProtect.php
includes/api/ApiQueryAllUsers.php
includes/api/ApiQueryBacklinks.php
includes/api/ApiQueryImageInfo.php
includes/api/ApiQuerySiteinfo.php
includes/api/ApiResult.php
includes/api/ApiUpload.php

index a8f1cd8..b1942bc 100644 (file)
@@ -711,7 +711,6 @@ class ApiHelp extends ApiBase {
                                        $suboptions,
                                        $haveModules
                                );
-                               $numSubmodules = count( $submodules );
                        }
 
                        $module->modifyHelp( $help, $suboptions, $haveModules );
index 63db63e..a808ac0 100644 (file)
@@ -177,7 +177,6 @@ class ApiParamInfo extends ApiBase {
         * @return ApiResult
         */
        private function getModuleInfo( $module ) {
-               $result = $this->getResult();
                $ret = array();
                $path = $module->getModulePath();
 
index 1b2efa5..9de5a02 100644 (file)
@@ -714,7 +714,6 @@ class ApiParse extends ApiBase {
 
        private function formatLimitReportData( $limitReportData ) {
                $result = array();
-               $apiResult = $this->getResult();
 
                foreach ( $limitReportData as $name => $value ) {
                        $entry = array();
index 22bd29c..d07301c 100644 (file)
@@ -56,7 +56,6 @@ class ApiProtect extends ApiBase {
                }
 
                $restrictionTypes = $titleObj->getRestrictionTypes();
-               $db = $this->getDB();
 
                $protections = array();
                $expiryarray = array();
index eb3e553..ffcb2f5 100644 (file)
@@ -264,7 +264,6 @@ class ApiQueryAllUsers extends ApiQueryBase {
                        }
 
                        if ( $fld_implicitgroups || $fld_groups || $fld_rights ) {
-                               $user = User::newFromId( $row->user_id );
                                $implicitGroups = User::newFromId( $row->user_id )->getAutomaticGroups();
                                if ( isset( $row->groups ) && $row->groups !== '' ) {
                                        $groups = array_merge( $implicitGroups, explode( '|', $row->groups ) );
index 1df14e0..6a31e19 100644 (file)
@@ -357,7 +357,6 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                // Parse and validate continuation parameter
                $this->cont = array();
                if ( $this->params['continue'] !== null ) {
-                       $db = $this->getDB();
                        $cont = explode( '|', $this->params['continue'] );
 
                        switch ( count( $cont ) ) {
index b23fbcf..0a8e2c9 100644 (file)
@@ -225,8 +225,6 @@ class ApiQueryImageInfo extends ApiQueryBase {
         * @return array|null Key-val array of 'width' and 'height', or null
         */
        public function getScale( $params ) {
-               $p = $this->getModulePrefix();
-
                if ( $params['urlwidth'] != -1 ) {
                        $scale = array();
                        $scale['width'] = $params['urlwidth'];
index 4f90e5f..7047339 100644 (file)
@@ -456,7 +456,6 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                        );
                }
 
-               $result = $this->getResult();
                ApiResult::setIndexedTagName( $data, 'db' );
 
                return $this->getResult()->addValue( 'query', $property, $data );
index cd4165b..3468cf6 100644 (file)
@@ -830,7 +830,6 @@ class ApiResult implements ApiSerializable {
 
                // BC transformations
                $boolKeys = null;
-               $forceKVP = false;
                if ( isset( $transforms['BC'] ) ) {
                        if ( !is_array( $transforms['BC'] ) ) {
                                throw new InvalidArgumentException( __METHOD__ . ':Value for "BC" must be an array' );
index f51b389..e76b365 100644 (file)
@@ -627,7 +627,6 @@ class ApiUpload extends ApiBase {
        protected function transformWarnings( $warnings ) {
                if ( $warnings ) {
                        // Add indices
-                       $result = $this->getResult();
                        ApiResult::setIndexedTagName( $warnings, 'warning' );
 
                        if ( isset( $warnings['duplicate'] ) ) {