From: Reedy Date: Tue, 7 Aug 2012 23:47:25 +0000 (+0100) Subject: Remove unused variables/function values returned X-Git-Tag: 1.31.0-rc.0~22807^2 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=e3f2a90bf04b63592f68eba7e32665837a81a526;p=lhc%2Fweb%2Fwiklou.git Remove unused variables/function values returned Fix trailing whitespace Change-Id: I53abf75e142f0166032b98e4adb3dabe06643017 --- diff --git a/includes/RecentChange.php b/includes/RecentChange.php index 288dd3eb87..332d0390d2 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -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'], diff --git a/includes/api/ApiDelete.php b/includes/api/ApiDelete.php index da13a226c2..2d36f19aa3 100644 --- a/includes/api/ApiDelete.php +++ b/includes/api/ApiDelete.php @@ -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 diff --git a/includes/api/ApiSetNotificationTimestamp.php b/includes/api/ApiSetNotificationTimestamp.php index f9ecfec7be..098b1a6601 100644 --- a/includes/api/ApiSetNotificationTimestamp.php +++ b/includes/api/ApiSetNotificationTimestamp.php @@ -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(); diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index b33766627f..3a9b5c5642 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -469,8 +469,6 @@ class ApiUpload extends ApiBase { * @return array */ protected function getApiWarnings() { - $warnings = array(); - $warnings = $this->mUpload->checkWarnings(); return $this->transformWarnings( $warnings ); diff --git a/includes/filerepo/backend/lockmanager/DBLockManager.php b/includes/filerepo/backend/lockmanager/DBLockManager.php index c2a5085819..f5d7b599f2 100644 --- a/includes/filerepo/backend/lockmanager/DBLockManager.php +++ b/includes/filerepo/backend/lockmanager/DBLockManager.php @@ -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 diff --git a/includes/logging/LogFormatter.php b/includes/logging/LogFormatter.php index a7c803d26c..4f3292f34f 100644 --- a/includes/logging/LogFormatter.php +++ b/includes/logging/LogFormatter.php @@ -187,7 +187,6 @@ class LogFormatter { public function getIRCActionText() { $this->plaintext = true; $this->irctext = true; - $text = $this->getActionText(); $entry = $this->entry; $parameters = $entry->getParameters(); diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index 3a6edd288f..8db5ac9f43 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -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] }} diff --git a/includes/specials/SpecialEditWatchlist.php b/includes/specials/SpecialEditWatchlist.php index 091f5ca920..b20348d350 100644 --- a/includes/specials/SpecialEditWatchlist.php +++ b/includes/specials/SpecialEditWatchlist.php @@ -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 ); diff --git a/includes/upload/UploadFromChunks.php b/includes/upload/UploadFromChunks.php index e50c6da0b7..87c798bbc9 100644 --- a/includes/upload/UploadFromChunks.php +++ b/includes/upload/UploadFromChunks.php @@ -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 *