WHERE page_id=rev_page AND $nothidden AND " . $cond ;
$result = $this->db->query( $sql, __METHOD__ );
$resultset = $this->db->resultObject( $result );
- while( $row = $resultset->fetchObject() ) {
+ foreach ( $resultset as $row ) {
$this->author_list .= "<contributor>" .
"<username>" .
htmlentities( $row->rev_user_text ) .
$sk = $wgUser->getSkin();
$count = 0;
$elements = array();
- while ( $s = $res->fetchObject() ) {
+ foreach ( $res as $s ) {
$count++;
if ( $count <= $limit ) {
// We have not yet reached the extra one that tells us there is more to fetch
$feed->outHeader();
if( $pager->getNumRows() > 0 ) {
- while( $row = $pager->mResult->fetchObject() ) {
+ foreach ( $pager->mResult as $row ) {
$feed->outItem( $this->feedItem( $row ) );
}
}
}
$this->mResult->rewind();
$batch = new LinkBatch;
- while ( $row = $this->mResult->fetchObject() ) {
+ foreach ( $this->mResult as $row ) {
$batch->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) );
}
$batch->execute();
$feed->outHeader();
if( $pager->getNumRows() > 0 ) {
- while( $row = $pager->mResult->fetchObject() ) {
+ foreach ( $pager->mResult->fetchObject() as $row ) {
$feed->outItem( $this->feedItem( $row ) );
}
}
$revision = null;
$restored = 0;
- while( $row = $ret->fetchObject() ) {
+ foreach ( $ret as $row ) {
// Check for key dupes due to shitty archive integrity.
if( $row->ar_rev_id ) {
$exists = $dbw->selectField( 'revision', '1', array('rev_id' => $row->ar_rev_id), __METHOD__ );
}
if ( $cnt = count( $tags = $wgParser->getTags() ) ) {
- for ( $i = 0; $i < $cnt; ++$i )
+ for ( $i = 0; $i < $cnt; ++$i ) {
$tags[$i] = "<{$tags[$i]}>";
+ }
$out .= $this->openExtType( wfMsg( 'version-parser-extensiontags' ), 'parser-tags' );
$out .= '<tr><td colspan="4">' . $this->listToText( $tags ). "</td></tr>\n";
}
- if( $cnt = count( $fhooks = $wgParser->getFunctionHooks() ) ) {
+ if( count( $fhooks = $wgParser->getFunctionHooks() ) ) {
$out .= $this->openExtType( wfMsg( 'version-parser-function-hooks' ), 'parser-function-hooks' );
$out .= '<tr><td colspan="4">' . $this->listToText( $fhooks ) . "</td></tr>\n";
}