Kill off numerous unused variables
authorReedy <reedy@wikimedia.org>
Sun, 9 Dec 2012 03:27:02 +0000 (03:27 +0000)
committerReedy <reedy@wikimedia.org>
Fri, 8 Mar 2013 02:36:24 +0000 (02:36 +0000)
Change-Id: I7039f1328f37ee669b694f73ee282602186bffd1

26 files changed:
includes/HTMLForm.php
includes/Title.php
includes/WebRequest.php
includes/ZipDirectoryReader.php
includes/api/ApiQueryImageInfo.php
includes/api/ApiQuerySiteinfo.php
includes/content/ContentHandler.php
includes/content/TextContent.php
includes/db/LoadBalancer.php
includes/filebackend/FSFileBackend.php
includes/filebackend/FileBackend.php
includes/filebackend/FileBackendGroup.php
includes/filebackend/FileBackendMultiWrite.php
includes/filebackend/FileBackendStore.php
includes/filebackend/SwiftFileBackend.php
includes/filerepo/FileRepo.php
includes/filerepo/file/LocalFile.php
includes/installer/DatabaseUpdater.php
includes/installer/Installer.php
includes/logging/LogEventsList.php
includes/logging/LogFormatter.php
includes/objectcache/DBABagOStuff.php
includes/parser/Parser.php
includes/specials/SpecialContributions.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialUploadStash.php

index 06e7ee4..98e54f9 100644 (file)
@@ -1326,7 +1326,7 @@ abstract class HTMLFormField {
         * @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();
index 46b0524..5d71251 100644 (file)
@@ -4464,7 +4464,7 @@ class Title {
                        // 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();
                }
index 2195fbb..3bb0011 100644 (file)
@@ -206,7 +206,7 @@ class WebRequest {
         * @return string
         */
        public static function detectProtocol() {
-               list( $proto, $stdPort ) = self::detectProtocolAndStdPort();
+               list( $proto, ) = self::detectProtocolAndStdPort();
                return $proto;
        }
 
index e5423f5..931e58d 100644 (file)
@@ -570,7 +570,7 @@ class ZipDirectoryReader {
                $size = 0;
                foreach ( $struct as $type ) {
                        if ( is_array( $type ) ) {
-                               list( $typeName, $fieldSize ) = $type;
+                               list( , $fieldSize ) = $type;
                                $size += $fieldSize;
                        } else {
                                $size += $type;
index 34f78e7..1352f06 100644 (file)
@@ -367,7 +367,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
                                        }
 
                                        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;
                                        }
index 596fd06..810e1d6 100644 (file)
@@ -376,7 +376,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                                );
                        }
                } else {
-                       list( $host, $lag, $index ) = $lb->getMaxLag();
+                       list( , $lag, $index ) = $lb->getMaxLag();
                        $data[] = array(
                                'host' => $wgShowHostnames
                                                ? $lb->getServerName( $index )
index d87c72d..ae549da 100644 (file)
@@ -1050,8 +1050,6 @@ abstract class ContentHandler {
                        wfSuppressWarnings();
 
                        foreach ( $handlers as $handler ) {
-                               $info = '';
-
                                if ( is_array( $handler ) ) {
                                        if ( is_object( $handler[0] ) ) {
                                                $info = get_class( $handler[0] );
index 23d21ec..65007c8 100644 (file)
@@ -173,14 +173,16 @@ class TextContent extends AbstractContent {
 
                # @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;
index cbd79c3..22684c8 100644 (file)
@@ -684,11 +684,8 @@ class LoadBalancer {
                                'See DefaultSettings.php entry for $wgDBservers.' );
                }
 
-               $host = $server['host'];
-               $dbname = $server['dbname'];
-
                if ( $dbNameOverride !== false ) {
-                       $server['dbname'] = $dbname = $dbNameOverride;
+                       $server['dbname'] = $dbNameOverride;
                }
 
                # Create object
index 9cdb856..fb5ac96 100644 (file)
@@ -145,7 +145,7 @@ class FSFileBackend extends FileBackendStore {
                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 @@ class FSFileBackend extends FileBackendStore {
         */
        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 @@ class FSFileBackend extends FileBackendStore {
         */
        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 @@ class FSFileBackend extends FileBackendStore {
         */
        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 @@ class FSFileBackend extends FileBackendStore {
         */
        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 @@ class FSFileBackend extends FileBackendStore {
         * @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 @@ class FSFileBackend extends FileBackendStore {
         * @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 @@ class FSFileBackend extends FileBackendStore {
         * @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 );
index 47bc7ac..77e35d4 100644 (file)
@@ -1279,7 +1279,7 @@ abstract class FileBackend {
         */
        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;
        }
 
index 0bf5279..d790a99 100644 (file)
@@ -184,7 +184,7 @@ class FileBackendGroup {
         * @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 );
                }
index e6fe147..efa5eac 100644 (file)
@@ -451,7 +451,7 @@ class FileBackendMultiWrite extends FileBackend {
         * @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 );
        }
 
index 35384c7..55bb8dd 100644 (file)
@@ -447,7 +447,7 @@ abstract class FileBackendStore extends FileBackend {
                        $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 @@ abstract class FileBackendStore extends FileBackend {
                        $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 @@ abstract class FileBackendStore extends FileBackend {
                        $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 @@ abstract class FileBackendStore extends FileBackend {
                        $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 @@ abstract class FileBackendStore extends FileBackend {
                        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 @@ abstract class FileBackendStore extends FileBackend {
                } 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 @@ abstract class FileBackendStore extends FileBackend {
                } 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 @@ abstract class FileBackendStore extends FileBackend {
        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 @@ abstract class FileBackendStore extends FileBackend {
         * @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 @@ abstract class FileBackendStore extends FileBackend {
                }
                // 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 @@ abstract class FileBackendStore extends FileBackend {
                $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;
                        }
index 283a820..7344ffd 100644 (file)
@@ -634,7 +634,7 @@ class SwiftFileBackend extends FileBackendStore {
 
                // (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 @@ class SwiftFileBackend extends FileBackendStore {
                                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 ) {
index 03d6ea9..3576782 100644 (file)
@@ -967,7 +967,6 @@ class FileRepo {
 
                $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 @@ class FileRepo {
                $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 @@ class FileRepo {
                $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 @@ class FileRepo {
         */
        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'] ) {
index d9ba4e4..e4c8d96 100644 (file)
@@ -730,9 +730,8 @@ class LocalFile extends File {
         *        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 @@ class LocalFileDeleteBatch {
                $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 @@ class LocalFileDeleteBatch {
                $files = $newBatch = array();
 
                foreach ( $batch as $batchItem ) {
-                       list( $src, $dest ) = $batchItem;
+                       list( $src, ) = $batchItem;
                        $files[$src] = $this->file->repo->getVirtualUrl( 'public' ) . '/' . rawurlencode( $src );
                }
 
index 746cd12..2a27735 100644 (file)
@@ -361,7 +361,7 @@ abstract class DatabaseUpdater {
                        $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;
                }
index c1af27c..e349b6a 100644 (file)
@@ -988,7 +988,7 @@ abstract class Installer {
                                continue;
                        }
 
-                       list( $all, $lang, $territory, $charset, $modifier ) = $m;
+                       list( , $lang, , , ) = $m;
 
                        $candidatesByLocale[$m[0]] = $m;
                        $candidatesByLang[$lang][] = $m;
index 47b2231..df771e2 100644 (file)
@@ -307,7 +307,6 @@ class LogEventsList extends ContextSource {
                $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() ) );
 
index 6c5b983..d1da710 100644 (file)
@@ -402,8 +402,10 @@ class LogFormatter {
 
                // 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 );
                }
 
index 51ce777..c82b3aa 100644 (file)
@@ -251,7 +251,7 @@ class DBABagOStuff extends BagOStuff {
 
                # 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
index 6270a87..2c46ee7 100644 (file)
@@ -1540,8 +1540,7 @@ class Parser {
                $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 @@ class Parser {
                                $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" );
                                }
index 569fde5..1ea903b 100644 (file)
@@ -626,7 +626,7 @@ class ContribsPager extends ReverseChronologicalPager {
                $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;
index b97a171..942c337 100644 (file)
@@ -447,9 +447,9 @@ class PageArchive {
                        $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 @@ class PageArchive {
                $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 );
 
index 31f9669..a19f030 100644 (file)
@@ -327,14 +327,9 @@ class SpecialUploadStash extends UnlistedSpecialPage {
        /**
         * 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();