r69920 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69919‎ | r69920 | r69921 >
Date:21:44, 25 July 2010
Author:reedy
Status:ok
Tags:
Comment:
More unused variables, whitespace
Modified paths:
  • /trunk/phase3/includes/ChangeTags.php (modified) (history)
  • /trunk/phase3/includes/RevisionDelete.php (modified) (history)
  • /trunk/phase3/includes/UserMailer.php (modified) (history)
  • /trunk/phase3/includes/media/GIF.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRevisiondelete.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialTags.php (modified) (history)
  • /trunk/phase3/maintenance/populateLogUsertext.php (modified) (history)
  • /trunk/phase3/maintenance/populateSha1.php (modified) (history)
  • /trunk/phase3/maintenance/storage/moveToExternal.php (modified) (history)
  • /trunk/phase3/maintenance/storage/orphanStats.php (modified) (history)
  • /trunk/phase3/maintenance/tests/ApiTest.php (modified) (history)
  • /trunk/phase3/skins/Vector.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/storage/moveToExternal.php
@@ -48,8 +48,7 @@
4949 print "Moving text rows from $minID to $maxID to external storage\n";
5050 $ext = new ExternalStoreDB;
5151 $numMoved = 0;
52 - $numStubs = 0;
53 -
 52+
5453 for ( $block = 0; $block < $numBlocks; $block++ ) {
5554 $blockStart = $block * $blockSize + $minID;
5655 $blockEnd = $blockStart + $blockSize - 1;
Index: trunk/phase3/maintenance/storage/orphanStats.php
@@ -34,7 +34,6 @@
3535 }
3636
3737 public function execute() {
38 - $extDBs = array();
3938 $dbr = wfGetDB( DB_SLAVE );
4039 if ( !$dbr->tableExists( 'blob_orphans' ) ) {
4140 $this->error( "blob_orphans doesn't seem to exist, need to run trackBlobs.php first", true );
Index: trunk/phase3/maintenance/populateSha1.php
@@ -53,8 +53,7 @@
5454 }
5555 $imageTable = $dbw->tableName( 'image' );
5656 $oldimageTable = $dbw->tableName( 'oldimage' );
57 - $batch = array();
58 -
 57+
5958 if ( $method == 'pipe' ) {
6059 // @fixme kill this and replace with a second unbuffered DB connection.
6160 global $wgDBuser, $wgDBserver, $wgDBpassword, $wgDBname;
Index: trunk/phase3/maintenance/tests/ApiTest.php
@@ -13,11 +13,8 @@
1414 'sessionkey' => null,
1515 );
1616 }
17 -
18 -
1917 }
2018
21 -
2219 class ApiTest extends ApiTestSetup {
2320
2421 function setup() {
Index: trunk/phase3/maintenance/populateLogUsertext.php
@@ -50,7 +50,7 @@
5151 $cond = "log_id BETWEEN $blockStart AND $blockEnd AND log_user = user_id";
5252 $res = $db->select( array( 'logging', 'user' ),
5353 array( 'log_id', 'user_name' ), $cond, __METHOD__ );
54 - $batch = array();
 54+
5555 $db->begin();
5656 foreach ( $res as $row ) {
5757 $db->update( 'logging', array( 'log_user_text' => $row->user_name ),
Index: trunk/phase3/skins/Vector.php
@@ -103,7 +103,6 @@
104104 } else {
105105 $talkId = "{$subjectId}_talk";
106106 }
107 - $currentId = $isTalk ? $talkId : $subjectId;
108107
109108 // Adds namespace links
110109 $links['namespaces'][$subjectId] = $this->tabAction(
Index: trunk/phase3/includes/ChangeTags.php
@@ -119,7 +119,6 @@
120120 }
121121
122122 // Figure out which conditions can be done.
123 - $join_field = '';
124123 if ( in_array( 'recentchanges', $tables ) ) {
125124 $join_cond = 'rc_id';
126125 } elseif( in_array( 'logging', $tables ) ) {
Index: trunk/phase3/includes/UserMailer.php
@@ -367,8 +367,6 @@
368368 # 2. minor edits (changes) are only regarded if the global flag indicates so
369369
370370 $isUserTalkPage = ($title->getNamespace() == NS_USER_TALK);
371 - $enotifusertalkpage = ($isUserTalkPage && $wgEnotifUserTalk);
372 - $enotifwatchlistpage = $wgEnotifWatchlist;
373371
374372 $this->title = $title;
375373 $this->timestamp = $timestamp;
Index: trunk/phase3/includes/media/GIF.php
@@ -61,8 +61,8 @@
6262 }
6363
6464 function getLongDesc( $image ) {
65 - global $wgUser, $wgLang;
66 - $sk = $wgUser->getSkin();
 65+ global $wgLang;
 66+
6767 $original = parent::getLongDesc( $image );
6868
6969 wfSuppressWarnings();
Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php
@@ -351,8 +351,6 @@
352352
353353 $wgOut->addHTML( "<ul>" );
354354
355 - $where = $revObjs = array();
356 -
357355 $numRevisions = 0;
358356 // Live revisions...
359357 $list = $this->getList();
Index: trunk/phase3/includes/specials/SpecialTags.php
@@ -27,11 +27,10 @@
2828 }
2929
3030 function execute( $par ) {
31 - global $wgOut, $wgUser, $wgMessageCache;
 31+ global $wgOut, $wgMessageCache;
3232
3333 $wgMessageCache->loadAllMessages();
3434
35 - $sk = $wgUser->getSkin();
3635 $wgOut->setPageTitle( wfMsg( 'tags-title' ) );
3736 $wgOut->wrapWikiMsg( "<div class='mw-tags-intro'>\n$1\n</div>", 'tags-intro' );
3837
Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -82,7 +82,7 @@
8383
8484 function __construct( $oldTitle, $newTitle ) {
8585 global $wgRequest, $wgUser;
86 - $target = isset($par) ? $par : $wgRequest->getVal( 'target' );
 86+
8787 $this->oldTitle = $oldTitle;
8888 $this->newTitle = $newTitle;
8989 $this->reason = $wgRequest->getText( 'wpReason' );
Index: trunk/phase3/includes/RevisionDelete.php
@@ -150,7 +150,7 @@
151151 $originalKey = $key = $paramArray[0];
152152 // $paramArray[1] is a CSV of the IDs
153153 $Ids = explode( ',', $paramArray[1] );
154 - $query = $paramArray[1];
 154+
155155 $revert = array();
156156
157157 // For if undeleted revisions are found amidst deleted ones.

Status & tagging log