// Otherwise, the group of the new row is appended to the last entry.
// The setContinue... is more complex because of this, and takes into account the higher sql limit
// to make sure all rows that belong to the same user are received.
- //
- while ( true ) {
- $row = $db->fetchObject( $res );
+
+ $row = $db->fetchObject( $res );
+ foreach ( $res as $row ) {
$count++;
if ( !$row || $lastUser !== $row->user_name ) {
}
}
- // No more rows left
- if ( !$row ) {
- break;
- }
-
if ( $count > $limit ) {
// We've reached the one extra which shows that there are additional pages to be had. Stop here...
$this->setContinueEnumParameter( 'from', $this->keyToTitle( $row->user_name ) );