From f0c8cbc6d9bc05c1aa1cfc89f13bee3514c947c3 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Mon, 26 Sep 2016 16:38:15 -0700 Subject: [PATCH] Remove a few unused variables Change-Id: Ibfc4c6cbbc08b5917f1a84d86d2d4a0855e371a1 --- includes/api/ApiAuthManagerHelper.php | 2 -- includes/api/ApiCSPReport.php | 1 - includes/db/DatabaseMssql.php | 2 +- includes/media/Bitmap.php | 2 +- maintenance/cleanupEmptyCategories.php | 1 - maintenance/initEditCount.php | 2 -- maintenance/rebuildFileCache.php | 1 - 7 files changed, 2 insertions(+), 9 deletions(-) diff --git a/includes/api/ApiAuthManagerHelper.php b/includes/api/ApiAuthManagerHelper.php index 8e57f93a08..1a42ccce9e 100644 --- a/includes/api/ApiAuthManagerHelper.php +++ b/includes/api/ApiAuthManagerHelper.php @@ -191,8 +191,6 @@ class ApiAuthManagerHelper { * @return array */ public function formatAuthenticationResponse( AuthenticationResponse $res ) { - $params = $this->module->extractRequestParams(); - $ret = [ 'status' => $res->status, ]; diff --git a/includes/api/ApiCSPReport.php b/includes/api/ApiCSPReport.php index 407ae71fbb..5a0edfcd82 100644 --- a/includes/api/ApiCSPReport.php +++ b/includes/api/ApiCSPReport.php @@ -85,7 +85,6 @@ class ApiCSPReport extends ApiBase { */ private function getFlags( $report ) { $reportOnly = $this->getParameter( 'reportonly' ); - $userAgent = $this->getRequest()->getHeader( 'user-agent' ); $source = $this->getParameter( 'source' ); $falsePositives = $this->getConfig()->get( 'CSPFalsePositiveUrls' ); diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php index eb061d85fe..6c87a001e9 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -771,7 +771,7 @@ class DatabaseMssql extends DatabaseBase { $this->mScrollableCursor = false; try { - $ret = $this->query( $sql ); + $this->query( $sql ); } catch ( Exception $e ) { $this->mScrollableCursor = true; throw $e; diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index ccd345c31f..c86eabdec0 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -276,7 +276,7 @@ class BitmapHandler extends TransformationalImageHandler { */ protected function transformImageMagickExt( $image, $params ) { global $wgSharpenReductionThreshold, $wgSharpenParameter, $wgMaxAnimatedGifArea, - $wgMaxInterlacingAreas, $wgJpegPixelFormat; + $wgJpegPixelFormat; try { $im = new Imagick(); diff --git a/maintenance/cleanupEmptyCategories.php b/maintenance/cleanupEmptyCategories.php index b8a246eb22..8672223819 100644 --- a/maintenance/cleanupEmptyCategories.php +++ b/maintenance/cleanupEmptyCategories.php @@ -147,7 +147,6 @@ TEXT } else { $where = []; } - $i = 0; $this->output( "Removing empty categories without description pages...\n" ); while ( true ) { diff --git a/maintenance/initEditCount.php b/maintenance/initEditCount.php index 6b06da781e..96aea03472 100644 --- a/maintenance/initEditCount.php +++ b/maintenance/initEditCount.php @@ -42,8 +42,6 @@ in the load balancer, usually indicating a replication environment.' ); $user = $dbw->tableName( 'user' ); $revision = $dbw->tableName( 'revision' ); - $dbver = $dbw->getServerVersion(); - // Autodetect mode... if ( $this->hasOption( 'background' ) ) { $backgroundMode = true; diff --git a/maintenance/rebuildFileCache.php b/maintenance/rebuildFileCache.php index 2287559795..da8a6bc36d 100644 --- a/maintenance/rebuildFileCache.php +++ b/maintenance/rebuildFileCache.php @@ -96,7 +96,6 @@ class RebuildFileCache extends Maintenance { $blockEnd = $start + $this->mBatchSize - 1; $dbw = $this->getDB( DB_MASTER ); - $mainContext = RequestContext::getMain(); // Go through each page and save the output while ( $blockEnd <= $end ) { // Get the pages -- 2.20.1