r77297 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77296‎ | r77297 | r77298 >
Date:20:01, 25 November 2010
Author:hashar
Status:reverted (Comments)
Tags:
Comment:
revert r76464

* mixed style changes and variable removing
* logic changes
* useful comments removed
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/ChangesList.php (modified) (history)
  • /trunk/phase3/includes/ConfEditor.php (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/HistoryPage.php (modified) (history)
  • /trunk/phase3/includes/ImagePage.php (modified) (history)
  • /trunk/phase3/includes/MimeMagic.php (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/includes/WatchlistEditor.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseIbm_db2.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseMssql.php (modified) (history)
  • /trunk/phase3/includes/db/DatabasePostgres.php (modified) (history)
  • /trunk/phase3/includes/diff/WikiDiff.php (modified) (history)
  • /trunk/phase3/includes/installer/DatabaseInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/MysqlInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/MysqlUpdater.php (modified) (history)
  • /trunk/phase3/includes/installer/OracleInstaller.php (modified) (history)
  • /trunk/phase3/includes/media/SVG.php (modified) (history)
  • /trunk/phase3/includes/parser/LinkHolderArray.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/includes/parser/Preprocessor_DOM.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialComparePages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialSearch.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)
  • /trunk/phase3/includes/upload/UploadBase.php (modified) (history)
  • /trunk/phase3/maintenance/dumpTextPass.php (modified) (history)
  • /trunk/phase3/maintenance/orphans.php (modified) (history)
  • /trunk/phase3/maintenance/populateCategory.php (modified) (history)
  • /trunk/phase3/maintenance/reassignEdits.php (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit/includes/UploadFromUrlTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit/includes/api/ApiUploadTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit/includes/api/RandomImageGenerator.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/tests/phpunit/includes/UploadFromUrlTest.php
@@ -133,6 +133,7 @@
134134 $this->assertTrue( $exception, "Got exception" );
135135
136136 self::$user->addGroup( 'sysop' );
 137+ $exception = false;
137138 $data = $this->doApiRequest( array(
138139 'action' => 'upload',
139140 'url' => 'http://bits.wikimedia.org/skins-1.5/common/images/poweredby_mediawiki_88x31.png',
Index: trunk/phase3/maintenance/tests/phpunit/includes/api/RandomImageGenerator.php
@@ -203,7 +203,6 @@
204204 $args[] = $filename;
205205
206206 $command = wfEscapeShellArg( $wgImageMagickConvertCommand ) . " " . implode( " ", $args );
207 - $retval = null;
208207 $output = wfShellExec( $command, $retval );
209208 return ( $retval === 0 );
210209 }
Index: trunk/phase3/maintenance/tests/phpunit/includes/api/ApiUploadTest.php
@@ -303,6 +303,7 @@
304304 global $wgUser;
305305 $wgUser = self::$users['uploader']->user;
306306
 307+ $extension = 'png';
307308 $mimeType = 'image/png';
308309
309310 $filePath = tempnam( wfTempDir(), "" );
@@ -616,7 +617,7 @@
617618 $hash = File::sha1Base36( $filePath );
618619 $dupes = RepoGroup::singleton()->findBySha1( $hash );
619620 $success = true;
620 - foreach ( $dupes as $dupe ) {
 621+ foreach ( $dupes as $key => $dupe ) {
621622 $success &= $this->deleteFileByTitle( $dupe->getTitle() );
622623 }
623624 return $success;
Index: trunk/phase3/maintenance/populateCategory.php
@@ -66,6 +66,7 @@
6767
6868 $maxlag = intval( $maxlag );
6969 $throttle = intval( $throttle );
 70+ $force = (bool)$force;
7071 if ( $begin !== '' ) {
7172 $where = 'cl_to > ' . $dbw->addQuotes( $begin );
7273 } else {
Index: trunk/phase3/maintenance/reassignEdits.php
@@ -108,7 +108,7 @@
109109 # Update recent changes if required
110110 if ( $rc ) {
111111 $this->output( "Updating recent changes..." );
112 - $dbw->update( 'recentchanges', $this->userSpecification( $to, 'rc_user', 'rc_user_text' ), $this->userConditions( $from, 'rc_user', 'rc_user_text' ), __METHOD__ );
 112+ $res = $dbw->update( 'recentchanges', $this->userSpecification( $to, 'rc_user', 'rc_user_text' ), $this->userConditions( $from, 'rc_user', 'rc_user_text' ), __METHOD__ );
113113 $this->output( "done.\n" );
114114 }
115115 }
Index: trunk/phase3/maintenance/orphans.php
@@ -165,6 +165,7 @@
166166 $dbw = wfGetDB( DB_MASTER );
167167 $page = $dbw->tableName( 'page' );
168168 $revision = $dbw->tableName( 'revision' );
 169+ $text = $dbw->tableName( 'text' );
169170
170171 if ( $fix ) {
171172 $dbw->lockTables( $dbw, 'text', __METHOD__ );
Index: trunk/phase3/maintenance/dumpTextPass.php
@@ -263,6 +263,7 @@
264264 while ( true ) {
265265 try {
266266 $text = $this->getTextDb( $id );
 267+ $ex = new MWException( "Graceful storage failure" );
267268 } catch ( DBQueryError $ex ) {
268269 $text = false;
269270 }
Index: trunk/phase3/includes/upload/UploadBase.php
@@ -340,7 +340,7 @@
341341 protected function verifyFile() {
342342 # get the title, even though we are doing nothing with it, because
343343 # we need to populate mFinalExtension
344 - $this->getTitle();
 344+ $nt = $this->getTitle();
345345
346346 $this->mFileProps = File::getPropsFromPath( $this->mTempPath, $this->mFinalExtension );
347347 $this->checkMacBinary();
Index: trunk/phase3/includes/diff/WikiDiff.php
@@ -313,7 +313,7 @@
314314 }
315315 $matches = $ymatches[$line];
316316 reset($matches);
317 - while ( list( , $y ) = each( $matches ) ) {
 317+ while ( list( $junk, $y ) = each( $matches ) ) {
318318 if ( empty( $this->in_seq[$y] ) ) {
319319 $k = $this->_lcs_pos( $y );
320320 assert( $k > 0 );
@@ -321,7 +321,7 @@
322322 break;
323323 }
324324 }
325 - while (list ( , $y) = each($matches)) {
 325+ while (list ( /* $junk */, $y) = each($matches)) {
326326 if ($y > $this->seq[$k-1]) {
327327 assert($y < $this->seq[$k]);
328328 // Optimization: this is a common case:
Index: trunk/phase3/includes/Article.php
@@ -1473,6 +1473,7 @@
14741474 global $wgOut;
14751475
14761476 $oldid = $this->getOldID();
 1477+ $useParserCache = $this->useParserCache( $oldid );
14771478 $parserOptions = $this->getParserOptions();
14781479
14791480 # Render printable version, use printable version cache
Index: trunk/phase3/includes/MimeMagic.php
@@ -826,7 +826,7 @@
827827 $m = trim( $m );
828828 $m = strtolower( $m );
829829
830 - if ( strpos( $m, 'unknown' ) === false ) {
 830+ if ( strpos( $m, 'unknown' ) !== false ) {
831831 $m = null;
832832 } else {
833833 wfDebug( __METHOD__.": magic mime type of $file: $m\n" );
Index: trunk/phase3/includes/parser/LinkHolderArray.php
@@ -159,6 +159,7 @@
160160 $current = null;
161161 foreach ( $this->internals as $ns => $entries ) {
162162 foreach ( $entries as $index => $entry ) {
 163+ $key = "$ns:$index";
163164 $title = $entry['title'];
164165 $pdbk = $entry['pdbk'];
165166
Index: trunk/phase3/includes/parser/Parser.php
@@ -789,6 +789,7 @@
790790 wfProfileIn( __METHOD__ );
791791
792792 $lines = StringUtils::explode( "\n", $text );
 793+ $text = null;
793794 $out = '';
794795 $td_history = array(); # Is currently a td tag open?
795796 $last_tag_history = array(); # Save history of last lag activated (td, th or caption)
Index: trunk/phase3/includes/parser/Preprocessor_DOM.php
@@ -511,7 +511,9 @@
512512 // another heading. Infinite loops are avoided because the next iteration MUST
513513 // hit the heading open case above, which unconditionally increments the
514514 // input pointer.
515 - } elseif ( $found == 'open' ) {
 515+ }
 516+
 517+ elseif ( $found == 'open' ) {
516518 # count opening brace characters
517519 $count = strspn( $text, $curChar, $i );
518520
@@ -534,7 +536,9 @@
535537 $accum .= htmlspecialchars( str_repeat( $curChar, $count ) );
536538 }
537539 $i += $count;
538 - } elseif ( $found == 'close' ) {
 540+ }
 541+
 542+ elseif ( $found == 'close' ) {
539543 $piece = $stack->top;
540544 # lets check if there are enough characters for closing brace
541545 $maxCount = $piece->count;
@@ -957,9 +961,7 @@
958962 $iteratorStack[$level] = false;
959963 }
960964
961 - if ( $contextNode instanceof PPNode_DOM ) {
962 - $contextNode = $contextNode->node;
963 - }
 965+ if ( $contextNode instanceof PPNode_DOM ) $contextNode = $contextNode->node;
964966
965967 $newIterator = false;
966968
Index: trunk/phase3/includes/ImagePage.php
@@ -331,6 +331,8 @@
332332 $height_orig = $this->displayImg->getHeight( $page );
333333 $height = $height_orig;
334334
 335+ $showLink = false;
 336+ $linkAttribs = array( 'href' => $full_url );
335337 $longDesc = $this->displayImg->getLongDesc();
336338
337339 wfRunHooks( 'ImageOpenShowImageInlineBefore', array( &$this, &$wgOut ) );
@@ -1009,7 +1011,6 @@
10101012 }
10111013 $row .= '</td>';
10121014
1013 - $rowClass = null;
10141015 wfRunHooks( 'ImagePageFileHistoryLine', array( $this, $file, &$row, &$rowClass ) );
10151016 $classAttr = $rowClass ? " class='$rowClass'" : "";
10161017
Index: trunk/phase3/includes/db/DatabasePostgres.php
@@ -751,6 +751,7 @@
752752 return true;
753753 }
754754 return false;
 755+
755756 }
756757
757758 /**
Index: trunk/phase3/includes/db/DatabaseIbm_db2.php
@@ -1249,9 +1249,11 @@
12501250 $join_conds );
12511251
12521252 // We must adjust for offset
1253 - if ( isset( $options['LIMIT'] ) && isset ( $options['OFFSET'] ) ) {
1254 - $limit = $options['LIMIT'];
1255 - $offset = $options['OFFSET'];
 1253+ if ( isset( $options['LIMIT'] ) ) {
 1254+ if ( isset ( $options['OFFSET'] ) ) {
 1255+ $limit = $options['LIMIT'];
 1256+ $offset = $options['OFFSET'];
 1257+ }
12561258 }
12571259
12581260 // DB2 does not have a proper num_rows() function yet, so we must emulate
Index: trunk/phase3/includes/db/DatabaseMssql.php
@@ -552,9 +552,9 @@
553553 */
554554 function nextSequenceValue( $seqName ) {
555555 if ( !$this->tableExists( 'sequence_' . $seqName ) ) {
556 - sqlsrv_query( $this->mConn, "CREATE TABLE [sequence_$seqName] (id INT NOT NULL IDENTITY PRIMARY KEY, junk varchar(10) NULL)" );
 556+ $ret = sqlsrv_query( $this->mConn, "CREATE TABLE [sequence_$seqName] (id INT NOT NULL IDENTITY PRIMARY KEY, junk varchar(10) NULL)" );
557557 }
558 - sqlsrv_query( $this->mConn, "INSERT INTO [sequence_$seqName] (junk) VALUES ('')" );
 558+ $ret = sqlsrv_query( $this->mConn, "INSERT INTO [sequence_$seqName] (junk) VALUES ('')" );
559559 $ret = sqlsrv_query( $this->mConn, "SELECT TOP 1 id FROM [sequence_$seqName] ORDER BY id DESC" );
560560 $row = sqlsrv_fetch_array( $ret, SQLSRV_FETCH_ASSOC );// KEEP ASSOC THERE, weird weird bug dealing with the return value if you don't
561561
Index: trunk/phase3/includes/WatchlistEditor.php
@@ -347,8 +347,7 @@
348348 */
349349 private function showNormalForm( $output, $user ) {
350350 global $wgUser;
351 - $count = $this->showItemCount( $output, $user );
352 - if( $count > 0 ) {
 351+ if( ( $count = $this->showItemCount( $output, $user ) ) > 0 ) {
353352 $self = SpecialPage::getTitleFor( 'Watchlist' );
354353 $form = Xml::openElement( 'form', array( 'method' => 'post',
355354 'action' => $self->getLocalUrl( array( 'action' => 'edit' ) ) ) );
Index: trunk/phase3/includes/EditPage.php
@@ -2232,9 +2232,7 @@
22332233
22342234 $script = '';
22352235 foreach ( $toolarray as $tool ) {
2236 - if ( !$tool ) {
2237 - continue;
2238 - }
 2236+ if ( !$tool ) continue;
22392237
22402238 $params = array(
22412239 $image = $wgStylePath . '/common/images/' . $tool['image'],
Index: trunk/phase3/includes/OutputPage.php
@@ -563,6 +563,11 @@
564564 $nameWithTags = Sanitizer::normalizeCharReferences( Sanitizer::removeHTMLtags( $name ) );
565565 $this->mPagetitle = $nameWithTags;
566566
 567+ $taction = $this->getPageTitleActionText();
 568+ if( !empty( $taction ) ) {
 569+ $name .= ' - '.$taction;
 570+ }
 571+
567572 # change "<i>foo&amp;bar</i>" to "foo&bar"
568573 $this->setHTMLTitle( wfMsg( 'pagetitle', Sanitizer::stripAllTags( $nameWithTags ) ) );
569574 }
Index: trunk/phase3/includes/HistoryPage.php
@@ -538,9 +538,7 @@
539539 $rev->isDeleted( Revision::DELETED_RESTRICTED ), false );
540540 }
541541 }
542 - if ( $del ) {
543 - $s .= " $del ";
544 - }
 542+ if( $del ) $s .= " $del ";
545543
546544 $s .= " $link";
547545 $s .= " <span class='history-user'>" .
Index: trunk/phase3/includes/installer/MysqlUpdater.php
@@ -355,7 +355,7 @@
356356 $prev_namespace = $row->cur_namespace;
357357 }
358358 $sql = "DELETE FROM $cur WHERE cur_id IN ( " . join( ',', $deleteId ) . ')';
359 - $this->db->query( $sql, __METHOD__ );
 359+ $rows = $this->db->query( $sql, __METHOD__ );
360360 $this->output( wfTimestamp( TS_DB ) );
361361 $this->output( "......<b>Deleted</b> " . $this->db->affectedRows() . " records.\n" );
362362 }
Index: trunk/phase3/includes/installer/DatabaseInstaller.php
@@ -395,6 +395,7 @@
396396 * Set this to false to show a creation checkbox.
397397 */
398398 public function getWebUserBox( $noCreateMsg = false ) {
 399+ $name = $this->getName();
399400 $s = Html::openElement( 'fieldset' ) .
400401 Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
401402 $this->getCheckBox(
Index: trunk/phase3/includes/installer/MysqlInstaller.php
@@ -366,7 +366,7 @@
367367 if ( !$create ) {
368368 // Test the web account
369369 try {
370 - new Database(
 370+ $webConn = new Database(
371371 $this->getVar( 'wgDBserver' ),
372372 $this->getVar( 'wgDBuser' ),
373373 $this->getVar( 'wgDBpassword' ),
Index: trunk/phase3/includes/installer/OracleInstaller.php
@@ -39,6 +39,7 @@
4040 }
4141
4242 public function getWebUserBox( $noCreateMsg = false ) {
 43+ $name = $this->getName();
4344 $this->parent->setVar( '_SameAccount', false );
4445 $this->parent->setVar( '_CreateDBAccount', true );
4546 $this->parent->setVar( 'wgDBname', '' );
Index: trunk/phase3/includes/media/SVG.php
@@ -150,6 +150,7 @@
151151 }
152152
153153 function getMetadata( $file, $filename ) {
 154+ $metadata = array();
154155 try {
155156 $metadata = SVGMetadataExtractor::getMetadata( $filename );
156157 } catch( Exception $e ) {
Index: trunk/phase3/includes/ChangesList.php
@@ -1055,7 +1055,7 @@
10561056 # Extract fields from DB into the function scope (rc_xxxx variables)
10571057 // FIXME: Would be good to replace this extract() call with something
10581058 // that explicitly initializes variables.
1059 - // TODO implement
 1059+ $classes = array(); // TODO implement
10601060 extract( $rcObj->mAttribs );
10611061 $query['curid'] = $rc_cur_id;
10621062
Index: trunk/phase3/includes/Title.php
@@ -3302,6 +3302,7 @@
33033303 # Truncate for whole multibyte characters. +5 bytes for ellipsis
33043304 $comment = $wgContLang->truncate( $comment, 250 );
33053305
 3306+ $newid = $nt->getArticleID();
33063307 $oldid = $this->getArticleID();
33073308 $latest = $this->getLatestRevId();
33083309
Index: trunk/phase3/includes/ConfEditor.php
@@ -536,7 +536,7 @@
537537
538538 switch ( $state ) {
539539 case 'file':
540 - $this->expect( T_OPEN_TAG );
 540+ $token = $this->expect( T_OPEN_TAG );
541541 $token = $this->skipSpace();
542542 if ( $token->isEnd() ) {
543543 break 2;
Index: trunk/phase3/includes/SkinTemplate.php
@@ -358,6 +358,7 @@
359359
360360 if( $wgPageShowWatchingUsers ) {
361361 $dbr = wfGetDB( DB_SLAVE );
 362+ $watchlist = $dbr->tableName( 'watchlist' );
362363 $res = $dbr->select( 'watchlist',
363364 array( 'COUNT(*) AS n' ),
364365 array( 'wl_title' => $dbr->strencode( $this->mTitle->getDBkey() ), 'wl_namespace' => $this->mTitle->getNamespace() ),
Index: trunk/phase3/includes/specials/SpecialComparePages.php
@@ -97,6 +97,7 @@
9898 $this->form();
9999
100100 if( $this->opts->getValue( 'rev1' ) && $this->opts->getValue( 'rev2' ) ) {
 101+ $title = Title::newFromText( $this->opts->getValue( 'page2' ) );
101102 $de = new DifferenceEngine( null,
102103 $this->opts->getValue( 'rev1' ),
103104 $this->opts->getValue( 'rev2' ),
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -176,6 +176,7 @@
177177 $wgOut->addWikiMsg( 'accmailtext', $u->getName(), $u->getEmail() );
178178 $wgOut->returnToMain( false );
179179 }
 180+ $u = 0;
180181 }
181182
182183 /**
@@ -619,7 +620,7 @@
620621 }
621622
622623 wfDebug( __METHOD__ . ": creating account\n" );
623 - $this->initUser( $user, true );
 624+ $user = $this->initUser( $user, true );
624625 return self::SUCCESS;
625626 }
626627
Index: trunk/phase3/includes/specials/SpecialSearch.php
@@ -342,9 +342,9 @@
343343 global $wgOut;
344344 // Figure out the active search profile header
345345 $nsAllSet = array_keys( SearchEngine::searchableNamespaces() );
346 - if( $this->searchAdvanced ) {
 346+ if( $this->searchAdvanced )
347347 $this->active = 'advanced';
348 - } else {
 348+ else {
349349 $profiles = $this->getSearchProfiles();
350350
351351 foreach( $profiles as $key => $data ) {
@@ -416,6 +416,7 @@
417417 if( !is_null($infoLine) ) {
418418 $out .= "\n<!-- {$infoLine} -->\n";
419419 }
 420+ $off = $this->offset + 1;
420421 $out .= "<ul class='mw-search-results'>\n";
421422 while( $result = $matches->next() ) {
422423 $out .= $this->showHit( $result, $terms );
@@ -622,6 +623,7 @@
623624
624625 $out = "<div id='mw-search-interwiki'><div id='mw-search-interwiki-caption'>".
625626 wfMsg('search-interwiki-caption')."</div>\n";
 627+ $off = $this->offset + 1;
626628 $out .= "<ul class='mw-search-iwresults'>\n";
627629
628630 // work out custom project captions

Follow-up revisions

RevisionCommit summaryAuthorDate
r77303Revert r77297, Won't be reverting MimeMagic...reedy22:22, 25 November 2010
r77304More reversion of r77297, 1 of 2 commits to keep it readable in CR (hopefully)reedy22:24, 25 November 2010
r77305More reversion of r77297, 2 of 2 commits to keep it readable in CR (hopefully)reedy22:24, 25 November 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76464Various unused variables, add some braces...reedy19:49, 10 November 2010

Comments

#Comment by Reedy (talk | contribs)   20:54, 25 November 2010

I'm not sure how doing a full revert of that commit was helpful.

For example, you've removed before a hook call

$rowClass = null;

And another one similarly later.

Then the things now breaking style guidelines.

Can't see any removal of comments. I did see 1 wrong logic change (for whatever reason there was a === to !=== or vice versa)...

#Comment by Reedy (talk | contribs)   21:56, 25 November 2010

/trunk/phase3/includes/Article.php $useParserCache = $this->useParserCache( $oldid ); is duplicated a few lines below

/trunk/phase3/includes/ChangesList.php

$classes = array(); is never used

/trunk/phase3/includes/ConfEditor.php

$token = $this->expect( T_OPEN_TAG ); $token is immeditaly replaced, but might throw an error and strike out, hence leaving

/trunk/phase3/includes/db/DatabaseIbm_db2.php Change is just merging 2 IF's

/trunk/phase3/includes/db/DatabaseMssql.php The 2 $rets are never used

/trunk/phase3/includes/db/DatabasePostgres.php Extra newline

/trunk/phase3/includes/diff/WikiDiff.php list( , $blah) is valid syntax. One was commented out, one not used

/trunk/phase3/includes/EditPage.php Only adding braces

/trunk/phase3/includes/HistoryPage.php Only adding braces

/trunk/phase3/includes/ImagePage.php $showLink = false; $linkAttribs = array( 'href' => $full_url ); Both of the above are never uesd

You removed added initialisation of variable passed to a hook

/trunk/phase3/includes/installer/DatabaseInstaller.php $name = $this->getName(); $name is never used

/trunk/phase3/includes/installer/MysqlInstaller.php $webConn is never used, but it is testing what's going on

/trunk/phase3/includes/installer/MysqlUpdater.php $rows is never used

/trunk/phase3/includes/installer/OracleInstaller.php $name = $this->getName();

/trunk/phase3/includes/media/SVG.php $metadata = array(); is never used

/trunk/phase3/includes/MimeMagic.php if ( strpos( $m, 'unknown' ) !== false ) { Seemingly the only "true" error in this commit. No idea what happened here

/trunk/phase3/includes/OutputPage.php $taction is only ever used to append to $name, which is never used (and not declared as a reference)

/trunk/phase3/includes/parser/LinkHolderArray.php $key is never used

/trunk/phase3/includes/parser/Parser.php $text is never used

/trunk/phase3/includes/parser/Preprocessor_DOM.php Addition of braces, and moval of else if to preceeding }

/trunk/phase3/includes/SkinTemplate.php $watchlist is never used, and then 'watchlist' is passed as a string to select below

/trunk/phase3/includes/specials/SpecialComparePages.php $title is never used

/trunk/phase3/includes/specials/SpecialSearch.php Braces added. 2 uses of $off never used

/trunk/phase3/includes/specials/SpecialUserlogin.php $u isn't static, and is set before the function end Returned user is never used

/trunk/phase3/includes/Title.php $newid is never used

/trunk/phase3/includes/upload/UploadBase.php $nt is never used anywhere

/trunk/phase3/includes/WatchlistEditor.php Assignment in condition is bad, mmkay?

/trunk/phase3/maintenance/dumpTextPass.php Exception assigned to $ex is never used

/trunk/phase3/maintenance/orphans.php $text table name is never used

/trunk/phase3/maintenance/populateCategory.php $force is never used from there on

/trunk/phase3/maintenance/reassignEdits.php $res is never used

/trunk/phase3/maintenance/tests/phpunit/includes/api/ApiUploadTest.php $extension = 'png'; is never used foreach ( $dupes as $key => $dupe ) { Key is never used

/trunk/phase3/maintenance/tests/phpunit/includes/api/RandomImageGenerator.php $retval should be initialised before function call

/trunk/phase3/maintenance/tests/phpunit/includes/UploadFromUrlTest.php $exception = false; $exception is never used

Status & tagging log