r62963 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62962‎ | r62963 | r62964 >
Date:16:31, 25 February 2010
Author:ashley
Status:deferred
Tags:
Comment:
SocialProfile: while -> foreach
Modified paths:
  • /trunk/extensions/SocialProfile/UserStats/UserStatsClass.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/UserStats/UserStatsClass.php
@@ -685,7 +685,7 @@
686686
687687 $list = array();
688688 $res = $dbr->query( $sql, __METHOD__ );
689 - while ( $row = $dbr->fetchObject( $res ) ) {
 689+ foreach ( $res as $row ) {
690690 $list[] = array(
691691 'user_id' => $row->stats_user_id,
692692 'user_name' => $row->stats_user_name,
@@ -718,7 +718,7 @@
719719
720720 $list = array();
721721 $res = $dbr->query( $sql, __METHOD__ );
722 - while ( $row = $dbr->fetchObject( $res ) ) {
 722+ foreach ( $res as $row ) {
723723 $list[] = array(
724724 'user_id' => $row->up_user_id,
725725 'user_name' => $row->up_user_name,
@@ -755,7 +755,7 @@
756756
757757 $list = array();
758758 $res = $dbr->query( $sql, __METHOD__ );
759 - while ( $row = $dbr->fetchObject( $res ) ) {
 759+ foreach ( $res as $row ) {
760760 $list[] = array(
761761 'user_id' => $row->stats_user_id,
762762 'user_name' => $row->stats_user_name,

Status & tagging log