Index: trunk/phase3/maintenance/storage/checkStorage.php |
— | — | @@ -145,7 +145,7 @@ |
146 | 146 | $this->error( 'restore text', "Error: invalid URL \"{$row->old_text}\"", $row->old_id ); |
147 | 147 | continue; |
148 | 148 | } |
149 | | - list( $proto, $path ) = $urlParts; |
| 149 | + list( $proto, ) = $urlParts; |
150 | 150 | if ( $proto != 'DB' ) { |
151 | 151 | $this->error( 'restore text', "Error: invalid external protocol \"$proto\"", $row->old_id ); |
152 | 152 | continue; |
Index: trunk/phase3/maintenance/tests/phpunit/includes/api/RandomImageGenerator.php |
— | — | @@ -204,12 +204,10 @@ |
205 | 205 | |
206 | 206 | $command = wfEscapeShellArg( $wgImageMagickConvertCommand ) . " " . implode( " ", $args ); |
207 | 207 | $retval = null; |
208 | | - $output = wfShellExec( $command, $retval ); |
| 208 | + wfShellExec( $command, $retval ); |
209 | 209 | return ( $retval === 0 ); |
210 | 210 | } |
211 | 211 | |
212 | | - |
213 | | - |
214 | 212 | /** |
215 | 213 | * Generate a string of random colors for ImageMagick, like "rgb(12, 37, 98)" |
216 | 214 | * |
Index: trunk/phase3/maintenance/tests/phpunit/includes/api/ApiUploadTest.php |
— | — | @@ -182,7 +182,7 @@ |
183 | 183 | 'lgname' => $user->username, |
184 | 184 | 'lgpassword' => $user->password |
185 | 185 | ); |
186 | | - list( $result, $request, $session ) = $this->doApiRequest( $params ); |
| 186 | + list( $result, , ) = $this->doApiRequest( $params ); |
187 | 187 | $this->assertArrayHasKey( "login", $result ); |
188 | 188 | $this->assertArrayHasKey( "result", $result['login'] ); |
189 | 189 | $this->assertEquals( "NeedToken", $result['login']['result'] ); |
— | — | @@ -194,7 +194,7 @@ |
195 | 195 | 'lgname' => $user->username, |
196 | 196 | 'lgpassword' => $user->password |
197 | 197 | ); |
198 | | - list( $result, $request, $session ) = $this->doApiRequest( $params ); |
| 198 | + list( $result, , $session ) = $this->doApiRequest( $params ); |
199 | 199 | $this->assertArrayHasKey( "login", $result ); |
200 | 200 | $this->assertArrayHasKey( "result", $result['login'] ); |
201 | 201 | $this->assertEquals( "Success", $result['login']['result'] ); |
— | — | @@ -280,7 +280,7 @@ |
281 | 281 | |
282 | 282 | $exception = false; |
283 | 283 | try { |
284 | | - list( $result, $request, $session ) = $this->doApiRequestWithToken( $params, $session ); |
| 284 | + list( $result, , ) = $this->doApiRequestWithToken( $params, $session ); |
285 | 285 | } catch ( UsageException $e ) { |
286 | 286 | $exception = true; |
287 | 287 | } |
— | — | @@ -324,7 +324,7 @@ |
325 | 325 | |
326 | 326 | $exception = false; |
327 | 327 | try { |
328 | | - list( $result, $request, $session ) = $this->doApiRequestWithToken( $params, $session ); |
| 328 | + $this->doApiRequestWithToken( $params, $session ); |
329 | 329 | } catch ( UsageException $e ) { |
330 | 330 | $this->assertContains( 'The file you submitted was empty', $e->getMessage() ); |
331 | 331 | $exception = true; |
— | — | @@ -378,7 +378,7 @@ |
379 | 379 | |
380 | 380 | $exception = false; |
381 | 381 | try { |
382 | | - list( $result, $request, $session ) = $this->doApiRequestWithToken( $params, $session ); |
| 382 | + list( $result, , $session ) = $this->doApiRequestWithToken( $params, $session ); |
383 | 383 | } catch ( UsageException $e ) { |
384 | 384 | $exception = true; |
385 | 385 | } |
— | — | @@ -394,7 +394,7 @@ |
395 | 395 | |
396 | 396 | $exception = false; |
397 | 397 | try { |
398 | | - list( $result, $request, $session ) = $this->doApiRequestWithToken( $params, $session ); |
| 398 | + list( $result, , ) = $this->doApiRequestWithToken( $params, $session ); |
399 | 399 | } catch ( UsageException $e ) { |
400 | 400 | $exception = true; |
401 | 401 | } |
Index: trunk/phase3/maintenance/tests/parser/parserTest.inc |
— | — | @@ -429,7 +429,6 @@ |
430 | 430 | $titleText = 'Parser test'; |
431 | 431 | } |
432 | 432 | |
433 | | - $noxml = isset( $opts['noxml'] ); |
434 | 433 | $local = isset( $opts['local'] ); |
435 | 434 | $preprocessor = isset( $opts['preprocessor'] ) ? $opts['preprocessor'] : null; |
436 | 435 | $parser = $this->getParser( $preprocessor ); |
Index: trunk/phase3/maintenance/reassignEdits.php |
— | — | @@ -45,7 +45,7 @@ |
46 | 46 | if ( $to->getId() || $this->hasOption( 'force' ) ) { |
47 | 47 | # Reassign the edits |
48 | 48 | $report = $this->hasOption( 'report' ); |
49 | | - $count = $this->doReassignEdits( $from, $to, !$this->hasOption( 'norc' ), $report ); |
| 49 | + $this->doReassignEdits( $from, $to, !$this->hasOption( 'norc' ), $report ); |
50 | 50 | # If reporting, and there were items, advise the user to run without --report |
51 | 51 | if ( $report ) { |
52 | 52 | $this->output( "Run the script again without --report to update.\n" ); |
Index: trunk/phase3/maintenance/fixSlaveDesync.php |
— | — | @@ -41,8 +41,6 @@ |
42 | 42 | if ( $this->hasArg() ) { |
43 | 43 | $this->desyncFixPage( $this->getArg() ); |
44 | 44 | } else { |
45 | | - $dbw = wfGetDB( DB_MASTER ); |
46 | | - $maxPage = $dbw->selectField( 'page', 'MAX(page_id)', false, __METHOD__ ); |
47 | 45 | $corrupt = $this->findPageLatestCorruption(); |
48 | 46 | foreach ( $corrupt as $id => $dummy ) { |
49 | 47 | $this->desyncFixPage( $id ); |
Index: trunk/phase3/includes/upload/UploadBase.php |
— | — | @@ -440,7 +440,6 @@ |
441 | 441 | $localFile = $this->getLocalFile(); |
442 | 442 | $filename = $localFile->getName(); |
443 | 443 | $n = strrpos( $filename, '.' ); |
444 | | - $partname = $n ? substr( $filename, 0, $n ) : $filename; |
445 | 444 | |
446 | 445 | /** |
447 | 446 | * Check whether the resulting filename is different from the desired one, |
Index: trunk/phase3/includes/upload/UploadStash.php |
— | — | @@ -303,7 +303,7 @@ |
304 | 304 | return null; |
305 | 305 | } |
306 | 306 | $extension = $this->getExtension(); |
307 | | - list( $thumbExt, $thumbMime ) = $this->handler->getThumbType( $extension, $this->getMimeType(), $params ); |
| 307 | + list( $thumbExt, ) = $this->handler->getThumbType( $extension, $this->getMimeType(), $params ); |
308 | 308 | $thumbName = $this->getHandler()->makeParamString( $params ) . '-' . $urlName; |
309 | 309 | if ( $thumbExt != $extension ) { |
310 | 310 | $thumbName .= ".$thumbExt"; |
Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -214,7 +214,7 @@ |
215 | 215 | } else { |
216 | 216 | reset( $a ); |
217 | 217 | reset( $b ); |
218 | | - while( ( list( $keyA, $valueA ) = each( $a ) ) && ( list( $keyB, $valueB ) = each( $b ) ) ) { |
| 218 | + while( ( list( , $valueA ) = each( $a ) ) && ( list( , $valueB ) = each( $b ) ) ) { |
219 | 219 | $cmp = strcmp( $valueA, $valueB ); |
220 | 220 | if ( $cmp !== 0 ) { |
221 | 221 | return $cmp; |
Index: trunk/phase3/includes/StubObject.php |
— | — | @@ -100,7 +100,7 @@ |
101 | 101 | throw new MWException( "Unstub loop detected on call of \${$this->mGlobal}->$name from $caller\n" ); |
102 | 102 | } |
103 | 103 | wfDebug( "Unstubbing \${$this->mGlobal} on call of \${$this->mGlobal}::$name from $caller\n" ); |
104 | | - $obj = $GLOBALS[$this->mGlobal] = $this->_newObject(); |
| 104 | + $GLOBALS[$this->mGlobal] = $this->_newObject(); |
105 | 105 | --$recursionLevel; |
106 | 106 | wfProfileOut( $fname ); |
107 | 107 | } |
Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -299,7 +299,6 @@ |
300 | 300 | |
301 | 301 | $this->loadFile(); |
302 | 302 | |
303 | | - $full_url = $this->displayImg->getURL(); |
304 | 303 | $sizeSel = intval( $wgUser->getOption( 'imagesize' ) ); |
305 | 304 | if ( !isset( $wgImageLimits[$sizeSel] ) ) { |
306 | 305 | $sizeSel = User::getDefaultOption( 'imagesize' ); |
Index: trunk/phase3/includes/db/DatabaseMysql.php |
— | — | @@ -90,7 +90,6 @@ |
91 | 91 | wfDebug( "DB connection error\n" ); |
92 | 92 | wfDebug( "Server: $server, User: $user, Password: " . |
93 | 93 | substr( $password, 0, 3 ) . "..., error: " . mysql_error() . "\n" ); |
94 | | - $success = false; |
95 | 94 | } |
96 | 95 | |
97 | 96 | wfProfileOut("dbconnect-$server"); |
Index: trunk/phase3/includes/db/LBFactory_Multi.php |
— | — | @@ -99,7 +99,7 @@ |
100 | 100 | } |
101 | 101 | |
102 | 102 | function newMainLB( $wiki = false ) { |
103 | | - list( $dbName, $prefix ) = $this->getDBNameAndPrefix( $wiki ); |
| 103 | + list( $dbName, ) = $this->getDBNameAndPrefix( $wiki ); |
104 | 104 | $section = $this->getSectionForWiki( $wiki ); |
105 | 105 | $groupLoads = array(); |
106 | 106 | if ( isset( $this->groupLoadsByDB[$dbName] ) ) { |
Index: trunk/phase3/includes/SquidPurgeClient.php |
— | — | @@ -265,7 +265,7 @@ |
266 | 266 | $this->markDown(); |
267 | 267 | return; |
268 | 268 | } |
269 | | - list( $all, $major, $minor, $status, $reason ) = $m; |
| 269 | + list( , , , $status, $reason ) = $m; |
270 | 270 | $status = intval( $status ); |
271 | 271 | if ( $status !== 200 && $status !== 404 ) { |
272 | 272 | $this->log( "unexpected status code: $status $reason" ); |
— | — | @@ -356,12 +356,12 @@ |
357 | 357 | } |
358 | 358 | |
359 | 359 | foreach ( $readSockets as $key => $socket ) { |
360 | | - list( $clientIndex, $i ) = explode( '/', $key ); |
| 360 | + list( $clientIndex, ) = explode( '/', $key ); |
361 | 361 | $client = $this->clients[$clientIndex]; |
362 | 362 | $client->doReads(); |
363 | 363 | } |
364 | 364 | foreach ( $writeSockets as $key => $socket ) { |
365 | | - list( $clientIndex, $i ) = explode( '/', $key ); |
| 365 | + list( $clientIndex, ) = explode( '/', $key ); |
366 | 366 | $client = $this->clients[$clientIndex]; |
367 | 367 | $client->doWrites(); |
368 | 368 | } |
Index: trunk/phase3/includes/media/SVGMetadataExtractor.php |
— | — | @@ -130,7 +130,6 @@ |
131 | 131 | $keepReading = $this->reader->read(); |
132 | 132 | while( $keepReading ) { |
133 | 133 | if( $this->reader->name == $name && $this->reader->nodeType == XmlReader::END_ELEMENT ) { |
134 | | - $keepReading = false; |
135 | 134 | break; |
136 | 135 | } elseif( $this->reader->nodeType == XmlReader::TEXT ){ |
137 | 136 | $this->metadata[$metafield] = $this->reader->value; |
— | — | @@ -169,9 +168,8 @@ |
170 | 169 | while( $keepReading ) { |
171 | 170 | if( $this->reader->name == $name && $this->reader->depth <= $exitDepth |
172 | 171 | && $this->reader->nodeType == XmlReader::END_ELEMENT ) { |
173 | | - $keepReading = false; |
174 | 172 | break; |
175 | | - } elseif( $this->reader->nodeType == XmlReader::ELEMENT ){ |
| 173 | + } elseif ( $this->reader->nodeType == XmlReader::ELEMENT ) { |
176 | 174 | switch( $this->reader->name ) { |
177 | 175 | case 'animate': |
178 | 176 | case 'set': |
Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -108,7 +108,7 @@ |
109 | 109 | if( $wgRequest->getVal( 'printable' ) === 'yes' ) { |
110 | 110 | $wgOut->setPrintable(); |
111 | 111 | } |
112 | | - $ret = null; |
| 112 | + |
113 | 113 | $curid = $wgRequest->getInt( 'curid' ); |
114 | 114 | if( $curid ) { |
115 | 115 | // URLs like this are generated by RC, because rc_title isn't always accurate |
Index: trunk/phase3/includes/MagicWord.php |
— | — | @@ -720,7 +720,7 @@ |
721 | 721 | continue; |
722 | 722 | } |
723 | 723 | if ( preg_match( $regex, $text, $m ) ) { |
724 | | - list( $id, $param ) = $this->parseMatch( $m ); |
| 724 | + list( $id, ) = $this->parseMatch( $m ); |
725 | 725 | if ( strlen( $m[0] ) >= strlen( $text ) ) { |
726 | 726 | $text = ''; |
727 | 727 | } else { |
Index: trunk/phase3/includes/ConfEditor.php |
— | — | @@ -176,7 +176,7 @@ |
177 | 177 | // Has it got a comma already? |
178 | 178 | if ( strpos( $lastEltPath, '@extra' ) === false && !$lastEltInfo['hasComma'] ) { |
179 | 179 | // No comma, insert one after the value region |
180 | | - list( $start, $end ) = $this->findValueRegion( $lastEltPath ); |
| 180 | + list( , $end ) = $this->findValueRegion( $lastEltPath ); |
181 | 181 | $this->replaceSourceRegion( $end - 1, $end - 1, ',' ); |
182 | 182 | } |
183 | 183 | |
— | — | @@ -184,7 +184,7 @@ |
185 | 185 | list( $start, $end ) = $this->findDeletionRegion( $lastEltPath ); |
186 | 186 | |
187 | 187 | if ( $key === null ) { |
188 | | - list( $indent, $arrowIndent ) = $this->getIndent( $start ); |
| 188 | + list( $indent, ) = $this->getIndent( $start ); |
189 | 189 | $textToInsert = "$indent$value,"; |
190 | 190 | } else { |
191 | 191 | list( $indent, $arrowIndent ) = |
— | — | @@ -202,12 +202,12 @@ |
203 | 203 | if ( $firstEltPath === false ) { |
204 | 204 | throw new MWException( "Can't find array element of \"$path\"" ); |
205 | 205 | } |
206 | | - list( $start, $end ) = $this->findDeletionRegion( $firstEltPath ); |
| 206 | + list( $start, ) = $this->findDeletionRegion( $firstEltPath ); |
207 | 207 | $info = $this->pathInfo[$firstEltPath]; |
208 | 208 | |
209 | 209 | // Make the text to insert |
210 | 210 | if ( $key === null ) { |
211 | | - list( $indent, $arrowIndent ) = $this->getIndent( $start ); |
| 211 | + list( $indent, ) = $this->getIndent( $start ); |
212 | 212 | $textToInsert = "$indent$value,"; |
213 | 213 | } else { |
214 | 214 | list( $indent, $arrowIndent ) = |
Index: trunk/phase3/includes/specials/SpecialAllpages.php |
— | — | @@ -307,7 +307,7 @@ |
308 | 308 | $namespace = NS_MAIN; |
309 | 309 | } else { |
310 | 310 | list( $namespace, $fromKey, $from ) = $fromList; |
311 | | - list( $namespace2, $toKey, $to ) = $toList; |
| 311 | + list( , $toKey, $to ) = $toList; |
312 | 312 | |
313 | 313 | $dbr = wfGetDB( DB_SLAVE ); |
314 | 314 | $conds = array( |
Index: trunk/phase3/includes/specials/SpecialWatchlist.php |
— | — | @@ -174,9 +174,7 @@ |
175 | 175 | # Possible where conditions |
176 | 176 | $conds = array(); |
177 | 177 | |
178 | | - if( $days <= 0 ) { |
179 | | - $andcutoff = ''; |
180 | | - } else { |
| 178 | + if( $days > 0 ) { |
181 | 179 | $conds[] = "rc_timestamp > '".$dbr->timestamp( time() - intval( $days * 86400 ) )."'"; |
182 | 180 | } |
183 | 181 | |
Index: trunk/phase3/includes/specials/SpecialSearch.php |
— | — | @@ -341,7 +341,6 @@ |
342 | 342 | protected function setupPage( $term ) { |
343 | 343 | global $wgOut; |
344 | 344 | // Figure out the active search profile header |
345 | | - $nsAllSet = array_keys( SearchEngine::searchableNamespaces() ); |
346 | 345 | if( $this->searchAdvanced ) { |
347 | 346 | $this->active = 'advanced'; |
348 | 347 | } else { |
Index: trunk/phase3/includes/specials/SpecialLinkSearch.php |
— | — | @@ -179,7 +179,7 @@ |
180 | 180 | */ |
181 | 181 | function doQuery( $offset, $limit, $shownavigation=true ) { |
182 | 182 | global $wgOut; |
183 | | - list( $this->mMungedQuery, $clause ) = LinkSearchPage::mungeQuery( $this->mQuery, $this->mProt ); |
| 183 | + list( $this->mMungedQuery, ) = LinkSearchPage::mungeQuery( $this->mQuery, $this->mProt ); |
184 | 184 | if( $this->mMungedQuery === false ) { |
185 | 185 | $wgOut->addWikiMsg( 'linksearch-error' ); |
186 | 186 | } else { |
Index: trunk/phase3/includes/SiteConfiguration.php |
— | — | @@ -293,8 +293,9 @@ |
294 | 294 | |
295 | 295 | $ret = call_user_func_array( $this->siteParamsCallback, array( $this, $wiki ) ); |
296 | 296 | # Validate the returned value |
297 | | - if( !is_array( $ret ) ) |
| 297 | + if( !is_array( $ret ) ) { |
298 | 298 | return $default; |
| 299 | + } |
299 | 300 | |
300 | 301 | foreach( $default as $name => $def ){ |
301 | 302 | if( !isset( $ret[$name] ) || ( is_array( $default[$name] ) && !is_array( $ret[$name] ) ) ) |