Remove unused variables/function values returned
authorReedy <reedy@wikimedia.org>
Tue, 7 Aug 2012 23:47:25 +0000 (00:47 +0100)
committerReedy <reedy@wikimedia.org>
Tue, 7 Aug 2012 23:47:25 +0000 (00:47 +0100)
Fix trailing whitespace

Change-Id: I53abf75e142f0166032b98e4adb3dabe06643017

includes/RecentChange.php
includes/api/ApiDelete.php
includes/api/ApiSetNotificationTimestamp.php
includes/api/ApiUpload.php
includes/filerepo/backend/lockmanager/DBLockManager.php
includes/logging/LogFormatter.php
includes/parser/CoreParserFunctions.php
includes/specials/SpecialEditWatchlist.php
includes/upload/UploadFromChunks.php

index 288dd3e..332d039 100644 (file)
@@ -246,7 +246,7 @@ class RecentChange {
                        if ( wfRunHooks( 'AbortEmailNotification', array($editor, $title) ) ) {
                                # @todo FIXME: This would be better as an extension hook
                                $enotif = new EmailNotification();
-                               $status = $enotif->notifyOnPageChange( $editor, $title,
+                               $enotif->notifyOnPageChange( $editor, $title,
                                        $this->mAttribs['rc_timestamp'],
                                        $this->mAttribs['rc_comment'],
                                        $this->mAttribs['rc_minor'],
index da13a22..2d36f19 100644 (file)
@@ -156,8 +156,6 @@ class ApiDelete extends ApiBase {
                        if ( !$oldfile->exists() || !$oldfile->isLocal() || $oldfile->getRedirected() ) {
                                return array( array( 'nodeleteablefile' ) );
                        }
-               } else {
-                       $oldfile = false;
                }
 
                if ( is_null( $reason ) ) { // Log and RC don't like null reasons
index f9ecfec..098b1a6 100644 (file)
@@ -49,7 +49,6 @@ class ApiSetNotificationTimestamp extends ApiBase {
                $args = array_merge( array( $params, 'entirewatchlist' ), array_keys( $pageSet->getAllowedParams() ) );
                call_user_func_array( array( $this, 'requireOnlyOneParameter' ), $args );
 
-               $db = $this->getDB();
                $dbw = $this->getDB( DB_MASTER );
 
                $timestamp = null;
@@ -136,7 +135,6 @@ class ApiSetNotificationTimestamp extends ApiBase {
                        }
 
                        // Now, put the valid titles into the result
-                       $pages = array();
                        foreach ( $pageSet->getTitles() as $title ) {
                                $ns = $title->getNamespace();
                                $dbkey = $title->getDBkey();
index b337666..3a9b5c5 100644 (file)
@@ -469,8 +469,6 @@ class ApiUpload extends ApiBase {
         * @return array
         */
        protected function getApiWarnings() {
-               $warnings = array();
-
                $warnings = $this->mUpload->checkWarnings();
 
                return $this->transformWarnings( $warnings );
index c2a5085..f5d7b59 100644 (file)
@@ -415,7 +415,7 @@ class DBLockManager extends LockManager {
         * Make sure remaining locks get cleared for sanity
         */
        function __destruct() {
-               foreach ( $this->conns as $lockDb => $db ) {
+               foreach ( $this->conns as $db ) {
                        if ( $db->trxLevel() ) { // in transaction
                                try {
                                        $db->rollback( __METHOD__ ); // finish transaction and kill any rows
index a7c803d..4f3292f 100644 (file)
@@ -187,7 +187,6 @@ class LogFormatter {
        public function getIRCActionText() {
                $this->plaintext = true;
                $this->irctext = true;
-               $text = $this->getActionText();
 
                $entry = $this->entry;
                $parameters = $entry->getParameters();
index 3a6edd2..8db5ac9 100644 (file)
@@ -793,7 +793,6 @@ class CoreParserFunctions {
        // or {{filepath|300px}}, {{filepath|200x300px}}, {{filepath|nowiki|200x300px}}, {{filepath|200x300px|nowiki}}
        public static function filepath( $parser, $name='', $argA='', $argB='' ) {
                $file = wfFindFile( $name );
-               $isNowiki = false;
 
                if( $argA == 'nowiki' ) {
                        // {{filepath: | option [| size] }}
index 091f5ca..b20348d 100644 (file)
@@ -499,7 +499,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                if ( count( $fields ) > 1 && $count > 30 ) {
                        $this->toc = Linker::tocIndent();
                        $tocLength = 0;
-                       foreach( $fields as $key => $data ) {
+                       foreach( $fields as $data ) {
 
                                # strip out the 'ns' prefix from the section name:
                                $ns = substr( $data['section'], 2 );
index e50c6da..87c798b 100644 (file)
@@ -77,7 +77,7 @@ class UploadFromChunks extends UploadFromFile {
 
                // Output a copy of this first to chunk 0 location:
                $status = $this->outputChunk( $this->mLocalFile->getPath() );
-               
+
                // Update db table to reflect initial "chunk" state 
                $this->updateChunkStatus();
                return $this->mLocalFile;
@@ -91,7 +91,7 @@ class UploadFromChunks extends UploadFromFile {
                $this->mUpload = $webRequestUpload;
                // Get the chunk status form the db: 
                $this->getChunkStatus();
-               
+
                $metadata = $this->stash->getMetadata( $key );
                $this->initializePathInfo( $name,
                        $this->getRealPath( $metadata['us_path'] ),
@@ -99,7 +99,7 @@ class UploadFromChunks extends UploadFromFile {
                        false
                );
        }
-       
+
        /**
         * Append the final chunk and ready file for parent::performUpload()
         * @return FileRepoStatus
@@ -194,7 +194,7 @@ class UploadFromChunks extends UploadFromFile {
                }
                return $status;
        }
-       
+
        /**
         * Update the chunk db table with the current status: 
         */
@@ -214,6 +214,7 @@ class UploadFromChunks extends UploadFromFile {
                        __METHOD__
                );
        }
+
        /**
         * Get the chunk db state and populate update relevant local values
         */
@@ -238,6 +239,7 @@ class UploadFromChunks extends UploadFromFile {
                        $this->mVirtualTempPath = $row->us_path;
                }
        }
+
        /**
         * Get the current Chunk index 
         * @return Integer index of the current chunk
@@ -248,7 +250,7 @@ class UploadFromChunks extends UploadFromFile {
                }
                return 0;
        }
-       
+
        /**
         * Gets the current offset in fromt the stashedupload table 
         * @return Integer current byte offset of the chunk file set 
@@ -259,7 +261,7 @@ class UploadFromChunks extends UploadFromFile {
                }
                return 0;
        }
-       
+
        /**
         * Output the chunk to disk
         *