jenkins-bot has submitted this change and it was merged.
Change subject: Kill off numerous unused variables
......................................................................
Kill off numerous unused variables
Change-Id: I7039f1328f37ee669b694f73ee282602186bffd1
---
M includes/HTMLForm.php
M includes/Title.php
M includes/WebRequest.php
M includes/ZipDirectoryReader.php
M includes/api/ApiQueryImageInfo.php
M includes/api/ApiQuerySiteinfo.php
M includes/content/ContentHandler.php
M includes/content/TextContent.php
M includes/db/LoadBalancer.php
M includes/filebackend/FSFileBackend.php
M includes/filebackend/FileBackend.php
M includes/filebackend/FileBackendGroup.php
M includes/filebackend/FileBackendMultiWrite.php
M includes/filebackend/FileBackendStore.php
M includes/filebackend/SwiftFileBackend.php
M includes/filerepo/FileRepo.php
M includes/filerepo/file/LocalFile.php
M includes/installer/DatabaseUpdater.php
M includes/installer/Installer.php
M includes/logging/LogEventsList.php
M includes/logging/LogFormatter.php
M includes/objectcache/DBABagOStuff.php
M includes/parser/Parser.php
M includes/specials/SpecialContributions.php
M includes/specials/SpecialUndelete.php
M includes/specials/SpecialUploadStash.php
26 files changed, 56 insertions(+), 70 deletions(-)
Approvals:
Alex Monk: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php
index 06e7ee4..98e54f9 100644
--- a/includes/HTMLForm.php
+++ b/includes/HTMLForm.php
@@ -1326,7 +1326,7 @@
* @return String complete HTML table row.
*/
public function getRaw( $value ) {
- list( $errors, $errorClass ) = $this->getErrorsAndErrorClass(
$value );
+ list( $errors, ) = $this->getErrorsAndErrorClass( $value );
$inputHtml = $this->getInputHTML( $value );
$helptext = $this->getHelpTextHtmlRaw( $this->getHelpText() );
$cellAttributes = array();
diff --git a/includes/Title.php b/includes/Title.php
index 46b0524..5d71251 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -4464,7 +4464,7 @@
// Use always content language to avoid loading
hundreds of languages
// to get the link color.
global $wgContLang;
- list( $name, $lang ) =
MessageCache::singleton()->figureMessage( $wgContLang->lcfirst(
$this->getText() ) );
+ list( $name, ) =
MessageCache::singleton()->figureMessage( $wgContLang->lcfirst(
$this->getText() ) );
$message = wfMessage( $name )->inLanguage( $wgContLang
)->useDatabase( false );
return $message->exists();
}
diff --git a/includes/WebRequest.php b/includes/WebRequest.php
index 2195fbb..3bb0011 100644
--- a/includes/WebRequest.php
+++ b/includes/WebRequest.php
@@ -206,7 +206,7 @@
* @return string
*/
public static function detectProtocol() {
- list( $proto, $stdPort ) = self::detectProtocolAndStdPort();
+ list( $proto, ) = self::detectProtocolAndStdPort();
return $proto;
}
diff --git a/includes/ZipDirectoryReader.php b/includes/ZipDirectoryReader.php
index e5423f5..931e58d 100644
--- a/includes/ZipDirectoryReader.php
+++ b/includes/ZipDirectoryReader.php
@@ -570,7 +570,7 @@
$size = 0;
foreach ( $struct as $type ) {
if ( is_array( $type ) ) {
- list( $typeName, $fieldSize ) = $type;
+ list( , $fieldSize ) = $type;
$size += $fieldSize;
} else {
$size += $type;
diff --git a/includes/api/ApiQueryImageInfo.php
b/includes/api/ApiQueryImageInfo.php
index 34f78e7..1352f06 100644
--- a/includes/api/ApiQueryImageInfo.php
+++ b/includes/api/ApiQueryImageInfo.php
@@ -367,7 +367,7 @@
}
if ( isset( $prop['thumbmime'] ) &&
$file->getHandler() ) {
- list( $ext, $mime ) =
$file->getHandler()->getThumbType(
+ list( , $mime ) =
$file->getHandler()->getThumbType(
$mto->getExtension(),
$file->getMimeType(), $thumbParams );
$vals['thumbmime'] = $mime;
}
diff --git a/includes/api/ApiQuerySiteinfo.php
b/includes/api/ApiQuerySiteinfo.php
index 596fd06..810e1d6 100644
--- a/includes/api/ApiQuerySiteinfo.php
+++ b/includes/api/ApiQuerySiteinfo.php
@@ -376,7 +376,7 @@
);
}
} else {
- list( $host, $lag, $index ) = $lb->getMaxLag();
+ list( , $lag, $index ) = $lb->getMaxLag();
$data[] = array(
'host' => $wgShowHostnames
? $lb->getServerName( $index )
diff --git a/includes/content/ContentHandler.php
b/includes/content/ContentHandler.php
index d87c72d..ae549da 100644
--- a/includes/content/ContentHandler.php
+++ b/includes/content/ContentHandler.php
@@ -1050,8 +1050,6 @@
wfSuppressWarnings();
foreach ( $handlers as $handler ) {
- $info = '';
-
if ( is_array( $handler ) ) {
if ( is_object( $handler[0] ) ) {
$info = get_class( $handler[0]
);
diff --git a/includes/content/TextContent.php b/includes/content/TextContent.php
index 23d21ec..65007c8 100644
--- a/includes/content/TextContent.php
+++ b/includes/content/TextContent.php
@@ -173,14 +173,16 @@
# @todo: could implement this in DifferenceEngine and just
delegate here?
- if ( !$lang ) $lang = $wgContLang;
+ if ( !$lang ) {
+ $lang = $wgContLang;
+ }
$otext = $this->getNativeData();
$ntext = $this->getNativeData();
# Note: Use native PHP diff, external engines don't give us
abstract output
- $ota = explode( "\n", $wgContLang->segmentForDiff( $otext ) );
- $nta = explode( "\n", $wgContLang->segmentForDiff( $ntext ) );
+ $ota = explode( "\n", $lang->segmentForDiff( $otext ) );
+ $nta = explode( "\n", $lang->segmentForDiff( $ntext ) );
$diff = new Diff( $ota, $nta );
return $diff;
diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php
index cbd79c3..22684c8 100644
--- a/includes/db/LoadBalancer.php
+++ b/includes/db/LoadBalancer.php
@@ -684,11 +684,8 @@
'See DefaultSettings.php entry for
$wgDBservers.' );
}
- $host = $server['host'];
- $dbname = $server['dbname'];
-
if ( $dbNameOverride !== false ) {
- $server['dbname'] = $dbname = $dbNameOverride;
+ $server['dbname'] = $dbNameOverride;
}
# Create object
diff --git a/includes/filebackend/FSFileBackend.php
b/includes/filebackend/FSFileBackend.php
index 9cdb856..fb5ac96 100644
--- a/includes/filebackend/FSFileBackend.php
+++ b/includes/filebackend/FSFileBackend.php
@@ -145,7 +145,7 @@
if ( $relPath === null ) {
return null; // invalid
}
- list( $b, $shortCont, $r ) = FileBackend::splitStoragePath(
$storagePath );
+ list( , $shortCont, ) = FileBackend::splitStoragePath(
$storagePath );
$fsPath = $this->containerFSRoot( $shortCont, $fullCont ); //
must be valid
if ( $relPath != '' ) {
$fsPath .= "/{$relPath}";
@@ -460,7 +460,7 @@
*/
protected function doPrepareInternal( $fullCont, $dirRel, array $params
) {
$status = Status::newGood();
- list( $b, $shortCont, $r ) = FileBackend::splitStoragePath(
$params['dir'] );
+ list( , $shortCont, ) = FileBackend::splitStoragePath(
$params['dir'] );
$contRoot = $this->containerFSRoot( $shortCont, $fullCont ); //
must be valid
$dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
$existed = is_dir( $dir ); // already there?
@@ -487,7 +487,7 @@
*/
protected function doSecureInternal( $fullCont, $dirRel, array $params
) {
$status = Status::newGood();
- list( $b, $shortCont, $r ) = FileBackend::splitStoragePath(
$params['dir'] );
+ list( , $shortCont, ) = FileBackend::splitStoragePath(
$params['dir'] );
$contRoot = $this->containerFSRoot( $shortCont, $fullCont ); //
must be valid
$dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
// Seed new directories with a blank index.html, to prevent
crawling...
@@ -518,7 +518,7 @@
*/
protected function doPublishInternal( $fullCont, $dirRel, array $params
) {
$status = Status::newGood();
- list( $b, $shortCont, $r ) = FileBackend::splitStoragePath(
$params['dir'] );
+ list( , $shortCont, ) = FileBackend::splitStoragePath(
$params['dir'] );
$contRoot = $this->containerFSRoot( $shortCont, $fullCont ); //
must be valid
$dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
// Unseed new directories with a blank index.html, to allow
crawling...
@@ -549,7 +549,7 @@
*/
protected function doCleanInternal( $fullCont, $dirRel, array $params )
{
$status = Status::newGood();
- list( $b, $shortCont, $r ) = FileBackend::splitStoragePath(
$params['dir'] );
+ list( , $shortCont, ) = FileBackend::splitStoragePath(
$params['dir'] );
$contRoot = $this->containerFSRoot( $shortCont, $fullCont ); //
must be valid
$dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
$this->trapWarnings();
@@ -598,7 +598,7 @@
* @return bool|null
*/
protected function doDirectoryExists( $fullCont, $dirRel, array $params
) {
- list( $b, $shortCont, $r ) = FileBackend::splitStoragePath(
$params['dir'] );
+ list( , $shortCont, ) = FileBackend::splitStoragePath(
$params['dir'] );
$contRoot = $this->containerFSRoot( $shortCont, $fullCont ); //
must be valid
$dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
@@ -614,7 +614,7 @@
* @return Array|null
*/
public function getDirectoryListInternal( $fullCont, $dirRel, array
$params ) {
- list( $b, $shortCont, $r ) = FileBackend::splitStoragePath(
$params['dir'] );
+ list( , $shortCont, ) = FileBackend::splitStoragePath(
$params['dir'] );
$contRoot = $this->containerFSRoot( $shortCont, $fullCont ); //
must be valid
$dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
$exists = is_dir( $dir );
@@ -633,7 +633,7 @@
* @return Array|FSFileBackendFileList|null
*/
public function getFileListInternal( $fullCont, $dirRel, array $params
) {
- list( $b, $shortCont, $r ) = FileBackend::splitStoragePath(
$params['dir'] );
+ list( , $shortCont, ) = FileBackend::splitStoragePath(
$params['dir'] );
$contRoot = $this->containerFSRoot( $shortCont, $fullCont ); //
must be valid
$dir = ( $dirRel != '' ) ? "{$contRoot}/{$dirRel}" : $contRoot;
$exists = is_dir( $dir );
diff --git a/includes/filebackend/FileBackend.php
b/includes/filebackend/FileBackend.php
index 47bc7ac..77e35d4 100644
--- a/includes/filebackend/FileBackend.php
+++ b/includes/filebackend/FileBackend.php
@@ -1279,7 +1279,7 @@
*/
final public static function parentStoragePath( $storagePath ) {
$storagePath = dirname( $storagePath );
- list( $b, $cont, $rel ) = self::splitStoragePath( $storagePath
);
+ list( , , $rel ) = self::splitStoragePath( $storagePath );
return ( $rel === null ) ? null : $storagePath;
}
diff --git a/includes/filebackend/FileBackendGroup.php
b/includes/filebackend/FileBackendGroup.php
index 0bf5279..d790a99 100644
--- a/includes/filebackend/FileBackendGroup.php
+++ b/includes/filebackend/FileBackendGroup.php
@@ -184,7 +184,7 @@
* @return FileBackend|null Backend or null on failure
*/
public function backendFromPath( $storagePath ) {
- list( $backend, $c, $p ) = FileBackend::splitStoragePath(
$storagePath );
+ list( $backend, , ) = FileBackend::splitStoragePath(
$storagePath );
if ( $backend !== null && isset( $this->backends[$backend] ) ) {
return $this->get( $backend );
}
diff --git a/includes/filebackend/FileBackendMultiWrite.php
b/includes/filebackend/FileBackendMultiWrite.php
index e6fe147..efa5eac 100644
--- a/includes/filebackend/FileBackendMultiWrite.php
+++ b/includes/filebackend/FileBackendMultiWrite.php
@@ -451,7 +451,7 @@
* @return bool Path container should have dir changes pushed to all
backends
*/
protected function replicateContainerDirChanges( $path ) {
- list( $b, $shortCont, $r ) = self::splitStoragePath( $path );
+ list( , $shortCont, ) = self::splitStoragePath( $path );
return !in_array( $shortCont, $this->noPushDirConts );
}
diff --git a/includes/filebackend/FileBackendStore.php
b/includes/filebackend/FileBackendStore.php
index 35384c7..55bb8dd 100644
--- a/includes/filebackend/FileBackendStore.php
+++ b/includes/filebackend/FileBackendStore.php
@@ -447,7 +447,7 @@
$status->merge( $this->doPrepareInternal( $fullCont,
$dir, $params ) );
} else { // directory is on several shards
wfDebug( __METHOD__ . ": iterating over all container
shards.\n" );
- list( $b, $shortCont, $r ) = self::splitStoragePath(
$params['dir'] );
+ list( , $shortCont, ) = self::splitStoragePath(
$params['dir'] );
foreach ( $this->getContainerSuffixes( $shortCont ) as
$suffix ) {
$status->merge( $this->doPrepareInternal(
"{$fullCont}{$suffix}", $dir, $params ) );
}
@@ -487,7 +487,7 @@
$status->merge( $this->doSecureInternal( $fullCont,
$dir, $params ) );
} else { // directory is on several shards
wfDebug( __METHOD__ . ": iterating over all container
shards.\n" );
- list( $b, $shortCont, $r ) = self::splitStoragePath(
$params['dir'] );
+ list( , $shortCont, ) = self::splitStoragePath(
$params['dir'] );
foreach ( $this->getContainerSuffixes( $shortCont ) as
$suffix ) {
$status->merge( $this->doSecureInternal(
"{$fullCont}{$suffix}", $dir, $params ) );
}
@@ -527,7 +527,7 @@
$status->merge( $this->doPublishInternal( $fullCont,
$dir, $params ) );
} else { // directory is on several shards
wfDebug( __METHOD__ . ": iterating over all container
shards.\n" );
- list( $b, $shortCont, $r ) = self::splitStoragePath(
$params['dir'] );
+ list( , $shortCont, ) = self::splitStoragePath(
$params['dir'] );
foreach ( $this->getContainerSuffixes( $shortCont ) as
$suffix ) {
$status->merge( $this->doPublishInternal(
"{$fullCont}{$suffix}", $dir, $params ) );
}
@@ -589,7 +589,7 @@
$this->deleteContainerCache( $fullCont ); // purge cache
} else { // directory is on several shards
wfDebug( __METHOD__ . ": iterating over all container
shards.\n" );
- list( $b, $shortCont, $r ) = self::splitStoragePath(
$params['dir'] );
+ list( , $shortCont, ) = self::splitStoragePath(
$params['dir'] );
foreach ( $this->getContainerSuffixes( $shortCont ) as
$suffix ) {
$status->merge( $this->doCleanInternal(
"{$fullCont}{$suffix}", $dir, $params ) );
$this->deleteContainerCache(
"{$fullCont}{$suffix}" ); // purge cache
@@ -951,7 +951,7 @@
return $this->doDirectoryExists( $fullCont, $dir,
$params );
} else { // directory is on several shards
wfDebug( __METHOD__ . ": iterating over all container
shards.\n" );
- list( $b, $shortCont, $r ) = self::splitStoragePath(
$params['dir'] );
+ list( , $shortCont, ) = self::splitStoragePath(
$params['dir'] );
$res = false; // response
foreach ( $this->getContainerSuffixes( $shortCont ) as
$suffix ) {
$exists = $this->doDirectoryExists(
"{$fullCont}{$suffix}", $dir, $params );
@@ -991,7 +991,7 @@
} else {
wfDebug( __METHOD__ . ": iterating over all container
shards.\n" );
// File listing spans multiple containers/shards
- list( $b, $shortCont, $r ) = self::splitStoragePath(
$params['dir'] );
+ list( , $shortCont, ) = self::splitStoragePath(
$params['dir'] );
return new FileBackendStoreShardDirIterator( $this,
$fullCont, $dir, $this->getContainerSuffixes(
$shortCont ), $params );
}
@@ -1024,7 +1024,7 @@
} else {
wfDebug( __METHOD__ . ": iterating over all container
shards.\n" );
// File listing spans multiple containers/shards
- list( $b, $shortCont, $r ) = self::splitStoragePath(
$params['dir'] );
+ list( , $shortCont, ) = self::splitStoragePath(
$params['dir'] );
return new FileBackendStoreShardFileIterator( $this,
$fullCont, $dir, $this->getContainerSuffixes(
$shortCont ), $params );
}
@@ -1302,7 +1302,7 @@
final public function preloadCache( array $paths ) {
$fullConts = array(); // full container names
foreach ( $paths as $path ) {
- list( $fullCont, $r, $s ) = $this->resolveStoragePath(
$path );
+ list( $fullCont, , ) = $this->resolveStoragePath( $path
);
$fullConts[] = $fullCont;
}
// Load from the persistent file and container caches
@@ -1465,7 +1465,7 @@
* @return bool
*/
final public function isSingleShardPathInternal( $storagePath ) {
- list( $c, $r, $shard ) = $this->resolveStoragePath(
$storagePath );
+ list( , , $shard ) = $this->resolveStoragePath( $storagePath );
return ( $shard !== null );
}
@@ -1608,7 +1608,7 @@
}
// Get all the corresponding cache keys for paths...
foreach ( $paths as $path ) {
- list( $fullCont, $r, $s ) = $this->resolveStoragePath(
$path );
+ list( $fullCont, , ) = $this->resolveStoragePath( $path
);
if ( $fullCont !== null ) { // valid path for this
backend
$contNames[$this->containerCacheKey( $fullCont
)] = $fullCont;
}
@@ -1709,7 +1709,7 @@
$paths = array_filter( $paths, 'strlen' ); // remove nulls
// Get all the corresponding cache keys for paths...
foreach ( $paths as $path ) {
- list( $cont, $rel, $s ) = $this->resolveStoragePath(
$path );
+ list( , $rel, ) = $this->resolveStoragePath( $path );
if ( $rel !== null ) { // valid path for this backend
$pathNames[$this->fileCacheKey( $path )] =
$path;
}
diff --git a/includes/filebackend/SwiftFileBackend.php
b/includes/filebackend/SwiftFileBackend.php
index 283a820..7344ffd 100644
--- a/includes/filebackend/SwiftFileBackend.php
+++ b/includes/filebackend/SwiftFileBackend.php
@@ -634,7 +634,7 @@
// (a) Check if container already exists
try {
- $contObj = $this->getContainer( $fullCont );
+ $this->getContainer( $fullCont );
// NoSuchContainerException not thrown: container must
exist
return $status; // already exists
} catch ( NoSuchContainerException $e ) {
@@ -869,8 +869,6 @@
try {
$sContObj = $this->getContainer(
$srcCont );
$obj = new CF_Object( $sContObj,
$srcRel, false, false ); // skip HEAD
- // Get source file extension
- $ext = FileBackend::extensionFromPath(
$path );
// Create a new temporary memory file...
$handle = fopen( 'php://temp', 'wb' );
if ( $handle ) {
diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php
index 03d6ea9..3576782 100644
--- a/includes/filerepo/FileRepo.php
+++ b/includes/filerepo/FileRepo.php
@@ -967,7 +967,6 @@
$date = gmdate( "YmdHis" );
$hashPath = $this->getHashPath( $originalName );
- $dstRel = "{$hashPath}{$date}!{$originalName}";
$dstUrlRel = $hashPath . $date . '!' . rawurlencode(
$originalName );
$virtualUrl = $this->getVirtualUrl( 'temp' ) . '/' . $dstUrlRel;
@@ -1097,7 +1096,7 @@
$operations = array();
$sourceFSFilesToDelete = array(); // cleanup for disk source
files
// Validate each triplet and get the store operation...
- foreach ( $ntuples as $i => $ntuple ) {
+ foreach ( $ntuples as $ntuple ) {
list( $srcPath, $dstRel, $archiveRel ) = $ntuple;
$options = isset( $ntuple[3] ) ? $ntuple[3] : array();
// Resolve source to a storage path if virtual
@@ -1176,7 +1175,7 @@
$status->merge( $backend->doOperations( $operations ) );
// Find out which files were archived...
foreach ( $ntuples as $i => $ntuple ) {
- list( $srcPath, $dstRel, $archiveRel ) = $ntuple;
+ list( , , $archiveRel ) = $ntuple;
$archivePath = $this->getZonePath( 'public' ) .
"/$archiveRel";
if ( $this->fileExists( $archivePath ) ) {
$status->value[$i] = 'archived';
@@ -1203,7 +1202,7 @@
*/
protected function initDirectory( $dir ) {
$path = $this->resolveToStoragePath( $dir );
- list( $b, $container, $r ) = FileBackend::splitStoragePath(
$path );
+ list( , $container, ) = FileBackend::splitStoragePath( $path );
$params = array( 'dir' => $path );
if ( $this->isPrivate || $container ===
$this->zones['deleted']['container'] ) {
diff --git a/includes/filerepo/file/LocalFile.php
b/includes/filerepo/file/LocalFile.php
index d9ba4e4..e4c8d96 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -730,9 +730,8 @@
* RTT regression for wikis without 404 handling.
*/
function migrateThumbFile( $thumbName ) {
- $thumbDir = $this->getThumbPath();
-
/* Old code for bug 2532
+ $thumbDir = $this->getThumbPath();
$thumbPath = "$thumbDir/$thumbName";
if ( is_dir( $thumbPath ) ) {
// Directory where file should be
@@ -1971,7 +1970,7 @@
$this->file->lock();
// Leave private files alone
$privateFiles = array();
- list( $oldRels, $deleteCurrent ) = $this->getOldRels();
+ list( $oldRels, ) = $this->getOldRels();
$dbw = $this->file->repo->getMasterDB();
if ( !empty( $oldRels ) ) {
@@ -2049,7 +2048,7 @@
$files = $newBatch = array();
foreach ( $batch as $batchItem ) {
- list( $src, $dest ) = $batchItem;
+ list( $src, ) = $batchItem;
$files[$src] = $this->file->repo->getVirtualUrl(
'public' ) . '/' . rawurlencode( $src );
}
diff --git a/includes/installer/DatabaseUpdater.php
b/includes/installer/DatabaseUpdater.php
index 746cd12..2a27735 100644
--- a/includes/installer/DatabaseUpdater.php
+++ b/includes/installer/DatabaseUpdater.php
@@ -361,7 +361,7 @@
$func = $funcList[0];
$arg = $funcList[1];
$origParams = $funcList[2];
- $ret = call_user_func_array( $func, $arg );
+ call_user_func_array( $func, $arg );
flush();
$this->updatesSkipped[] = $origParams;
}
diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php
index c1af27c..e349b6a 100644
--- a/includes/installer/Installer.php
+++ b/includes/installer/Installer.php
@@ -988,7 +988,7 @@
continue;
}
- list( $all, $lang, $territory, $charset, $modifier ) =
$m;
+ list( , $lang, , , ) = $m;
$candidatesByLocale[$m[0]] = $m;
$candidatesByLang[$lang][] = $m;
diff --git a/includes/logging/LogEventsList.php
b/includes/logging/LogEventsList.php
index 47b2231..df771e2 100644
--- a/includes/logging/LogEventsList.php
+++ b/includes/logging/LogEventsList.php
@@ -307,7 +307,6 @@
$formatter->setContext( $this->getContext() );
$formatter->setShowUserToolLinks( !( $this->flags &
self::NO_EXTRA_USER_LINKS ) );
- $title = $entry->getTarget();
$time = htmlspecialchars( $this->getLanguage()->userTimeAndDate(
$entry->getTimestamp(), $this->getUser() ) );
diff --git a/includes/logging/LogFormatter.php
b/includes/logging/LogFormatter.php
index 6c5b983..d1da710 100644
--- a/includes/logging/LogFormatter.php
+++ b/includes/logging/LogFormatter.php
@@ -402,8 +402,10 @@
// Filter out parameters which are not in format #:foo
foreach ( $entry->getParameters() as $key => $value ) {
- if ( strpos( $key, ':' ) === false ) continue;
- list( $index, $type, $name ) = explode( ':', $key, 3 );
+ if ( strpos( $key, ':' ) === false ) {
+ continue;
+ }
+ list( $index, $type, ) = explode( ':', $key, 3 );
$params[$index - 1] = $this->formatParameterValue(
$type, $value );
}
diff --git a/includes/objectcache/DBABagOStuff.php
b/includes/objectcache/DBABagOStuff.php
index 51ce777..c82b3aa 100644
--- a/includes/objectcache/DBABagOStuff.php
+++ b/includes/objectcache/DBABagOStuff.php
@@ -251,7 +251,7 @@
# Insert failed, check to see if it failed due to an expired key
if ( !$ret ) {
- list( $value, $expiry ) = $this->decode( dba_fetch(
$key, $handle ) );
+ list( , $expiry ) = $this->decode( dba_fetch( $key,
$handle ) );
if ( $expiry && $expiry < time() ) {
# Yes expired, delete and try again
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 6270a87..2c46ee7 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -1540,8 +1540,7 @@
$i = 0;
while ( $i<count( $bits ) ) {
$url = $bits[$i++];
- // @todo FIXME: Unused variable.
- $protocol = $bits[$i++];
+ $i++; // protocol
$text = $bits[$i++];
$trail = $bits[$i++];
@@ -3845,7 +3844,7 @@
$output = call_user_func_array(
$this->mTagHooks[$name],
array( $content, $attributes, $this,
$frame ) );
} elseif ( isset( $this->mFunctionTagHooks[$name] ) ) {
- list( $callback, $flags ) =
$this->mFunctionTagHooks[$name];
+ list( $callback, ) =
$this->mFunctionTagHooks[$name];
if ( !is_callable( $callback ) ) {
throw new MWException( "Tag hook for
$name is not callable\n" );
}
diff --git a/includes/specials/SpecialContributions.php
b/includes/specials/SpecialContributions.php
index 569fde5..1ea903b 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -626,7 +626,7 @@
$result = array();
// loop all results and collect them in an array
- foreach ( $data as $j => $query ) {
+ foreach ( $data as $query ) {
foreach ( $query as $i => $row ) {
// use index column as key, allowing us to
easily sort in PHP
$result[$row->{$this->getIndexField()} . "-$i"]
= $row;
diff --git a/includes/specials/SpecialUndelete.php
b/includes/specials/SpecialUndelete.php
index b97a171..942c337 100644
--- a/includes/specials/SpecialUndelete.php
+++ b/includes/specials/SpecialUndelete.php
@@ -447,9 +447,9 @@
$makepage = false;
# Page already exists. Import the history, and if
necessary
# we'll update the latest revision field in the record.
- $newid = 0;
- $pageId = $page->page_id;
+
$previousRevId = $page->page_latest;
+
# Get the time span of this page
$previousTimestamp = $dbw->selectField( 'revision',
'rev_timestamp',
array( 'rev_id' => $previousRevId ),
@@ -532,10 +532,8 @@
$revision = Revision::newFromArchiveRow( $row,
array(
'title' => $article->getTitle(), // used to
derive default content model
- ) );
-
- $m = $revision->getContentModel();
-
+ )
+ );
$user = User::newFromName( $revision->getRawUserText(), false );
$content = $revision->getContent( Revision::RAW );
diff --git a/includes/specials/SpecialUploadStash.php
b/includes/specials/SpecialUploadStash.php
index 31f9669..a19f030 100644
--- a/includes/specials/SpecialUploadStash.php
+++ b/includes/specials/SpecialUploadStash.php
@@ -327,14 +327,9 @@
/**
* Default action when we don't have a subpage -- just show links to
the uploads we have,
* Also show a button to clear stashed files
- * @param $status [optional] Status: the result of processRequest
* @return bool
*/
- private function showUploads( $status = null ) {
- if ( $status === null ) {
- $status = Status::newGood();
- }
-
+ private function showUploads() {
// sets the title, etc.
$this->setHeaders();
$this->outputHeader();
--
To view, visit https://gerrit.wikimedia.org/r/37666
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7039f1328f37ee669b694f73ee282602186bffd1
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits