From 32ff1f4c47dfcafd8b160c3a600b614e828f4618 Mon Sep 17 00:00:00 2001 From: Reedy Date: Sat, 7 Nov 2015 21:22:17 +0000 Subject: [PATCH] Remove various unused variables Change-Id: I4b1b20b4126735cb32a80e473fe48d523bcb24d1 --- includes/api/ApiHelp.php | 1 - includes/api/ApiParamInfo.php | 1 - includes/api/ApiParse.php | 1 - includes/api/ApiProtect.php | 1 - includes/api/ApiQueryAllUsers.php | 1 - includes/api/ApiQueryBacklinks.php | 1 - includes/api/ApiQueryImageInfo.php | 2 -- includes/api/ApiQuerySiteinfo.php | 1 - includes/api/ApiResult.php | 1 - includes/api/ApiUpload.php | 1 - 10 files changed, 11 deletions(-) diff --git a/includes/api/ApiHelp.php b/includes/api/ApiHelp.php index a8f1cd84d5..b1942bc1a1 100644 --- a/includes/api/ApiHelp.php +++ b/includes/api/ApiHelp.php @@ -711,7 +711,6 @@ class ApiHelp extends ApiBase { $suboptions, $haveModules ); - $numSubmodules = count( $submodules ); } $module->modifyHelp( $help, $suboptions, $haveModules ); diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php index 63db63ef0d..a808ac0039 100644 --- a/includes/api/ApiParamInfo.php +++ b/includes/api/ApiParamInfo.php @@ -177,7 +177,6 @@ class ApiParamInfo extends ApiBase { * @return ApiResult */ private function getModuleInfo( $module ) { - $result = $this->getResult(); $ret = array(); $path = $module->getModulePath(); diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index 1b2efa5f02..9de5a02386 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -714,7 +714,6 @@ class ApiParse extends ApiBase { private function formatLimitReportData( $limitReportData ) { $result = array(); - $apiResult = $this->getResult(); foreach ( $limitReportData as $name => $value ) { $entry = array(); diff --git a/includes/api/ApiProtect.php b/includes/api/ApiProtect.php index 22bd29cfa8..d07301c520 100644 --- a/includes/api/ApiProtect.php +++ b/includes/api/ApiProtect.php @@ -56,7 +56,6 @@ class ApiProtect extends ApiBase { } $restrictionTypes = $titleObj->getRestrictionTypes(); - $db = $this->getDB(); $protections = array(); $expiryarray = array(); diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index eb3e553749..ffcb2f532c 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -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 ) ); diff --git a/includes/api/ApiQueryBacklinks.php b/includes/api/ApiQueryBacklinks.php index 1df14e0b8a..6a31e194ea 100644 --- a/includes/api/ApiQueryBacklinks.php +++ b/includes/api/ApiQueryBacklinks.php @@ -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 ) ) { diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index b23fbcfd26..0a8e2c928d 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -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']; diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 4f90e5f13d..704733984f 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -456,7 +456,6 @@ class ApiQuerySiteinfo extends ApiQueryBase { ); } - $result = $this->getResult(); ApiResult::setIndexedTagName( $data, 'db' ); return $this->getResult()->addValue( 'query', $property, $data ); diff --git a/includes/api/ApiResult.php b/includes/api/ApiResult.php index cd4165b603..3468cf69fd 100644 --- a/includes/api/ApiResult.php +++ b/includes/api/ApiResult.php @@ -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' ); diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index f51b389122..e76b3651eb 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -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'] ) ) { -- 2.20.1