Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -644,7 +644,7 @@ |
645 | 645 | $sk = $wgUser->getSkin(); |
646 | 646 | $count = 0; |
647 | 647 | $elements = array(); |
648 | | - while ( $s = $res->fetchObject() ) { |
| 648 | + foreach ( $res as $s ) { |
649 | 649 | $count++; |
650 | 650 | if ( $count <= $limit ) { |
651 | 651 | // We have not yet reached the extra one that tells us there is more to fetch |
Index: trunk/phase3/includes/Export.php |
— | — | @@ -167,7 +167,7 @@ |
168 | 168 | WHERE page_id=rev_page AND $nothidden AND " . $cond ; |
169 | 169 | $result = $this->db->query( $sql, __METHOD__ ); |
170 | 170 | $resultset = $this->db->resultObject( $result ); |
171 | | - while( $row = $resultset->fetchObject() ) { |
| 171 | + foreach ( $resultset as $row ) { |
172 | 172 | $this->author_list .= "<contributor>" . |
173 | 173 | "<username>" . |
174 | 174 | htmlentities( $row->rev_user_text ) . |
Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -492,7 +492,7 @@ |
493 | 493 | $revision = null; |
494 | 494 | $restored = 0; |
495 | 495 | |
496 | | - while( $row = $ret->fetchObject() ) { |
| 496 | + foreach ( $ret as $row ) { |
497 | 497 | // Check for key dupes due to shitty archive integrity. |
498 | 498 | if( $row->ar_rev_id ) { |
499 | 499 | $exists = $dbw->selectField( 'revision', '1', array('rev_id' => $row->ar_rev_id), __METHOD__ ); |
Index: trunk/phase3/includes/specials/SpecialNewpages.php |
— | — | @@ -366,7 +366,7 @@ |
367 | 367 | |
368 | 368 | $feed->outHeader(); |
369 | 369 | if( $pager->getNumRows() > 0 ) { |
370 | | - while( $row = $pager->mResult->fetchObject() ) { |
| 370 | + foreach ( $pager->mResult->fetchObject() as $row ) { |
371 | 371 | $feed->outItem( $this->feedItem( $row ) ); |
372 | 372 | } |
373 | 373 | } |
Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -416,7 +416,7 @@ |
417 | 417 | |
418 | 418 | $feed->outHeader(); |
419 | 419 | if( $pager->getNumRows() > 0 ) { |
420 | | - while( $row = $pager->mResult->fetchObject() ) { |
| 420 | + foreach ( $pager->mResult as $row ) { |
421 | 421 | $feed->outItem( $this->feedItem( $row ) ); |
422 | 422 | } |
423 | 423 | } |
Index: trunk/phase3/includes/specials/SpecialVersion.php |
— | — | @@ -294,13 +294,14 @@ |
295 | 295 | } |
296 | 296 | |
297 | 297 | if ( $cnt = count( $tags = $wgParser->getTags() ) ) { |
298 | | - for ( $i = 0; $i < $cnt; ++$i ) |
| 298 | + for ( $i = 0; $i < $cnt; ++$i ) { |
299 | 299 | $tags[$i] = "<{$tags[$i]}>"; |
| 300 | + } |
300 | 301 | $out .= $this->openExtType( wfMsg( 'version-parser-extensiontags' ), 'parser-tags' ); |
301 | 302 | $out .= '<tr><td colspan="4">' . $this->listToText( $tags ). "</td></tr>\n"; |
302 | 303 | } |
303 | 304 | |
304 | | - if( $cnt = count( $fhooks = $wgParser->getFunctionHooks() ) ) { |
| 305 | + if( count( $fhooks = $wgParser->getFunctionHooks() ) ) { |
305 | 306 | $out .= $this->openExtType( wfMsg( 'version-parser-function-hooks' ), 'parser-function-hooks' ); |
306 | 307 | $out .= '<tr><td colspan="4">' . $this->listToText( $fhooks ) . "</td></tr>\n"; |
307 | 308 | } |
Index: trunk/phase3/includes/specials/SpecialListusers.php |
— | — | @@ -167,7 +167,7 @@ |
168 | 168 | } |
169 | 169 | $this->mResult->rewind(); |
170 | 170 | $batch = new LinkBatch; |
171 | | - while ( $row = $this->mResult->fetchObject() ) { |
| 171 | + foreach ( $this->mResult as $row ) { |
172 | 172 | $batch->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) ); |
173 | 173 | } |
174 | 174 | $batch->execute(); |