Index: trunk/phase3/includes/api/ApiQueryAllUsers.php |
— | — | @@ -128,9 +128,9 @@ |
129 | 129 | // Otherwise, the group of the new row is appended to the last entry. |
130 | 130 | // The setContinue... is more complex because of this, and takes into account the higher sql limit |
131 | 131 | // to make sure all rows that belong to the same user are received. |
132 | | - // |
133 | | - while ( true ) { |
134 | | - $row = $db->fetchObject( $res ); |
| 132 | + |
| 133 | + $row = $db->fetchObject( $res ); |
| 134 | + foreach ( $res as $row ) { |
135 | 135 | $count++; |
136 | 136 | |
137 | 137 | if ( !$row || $lastUser !== $row->user_name ) { |
— | — | @@ -145,11 +145,6 @@ |
146 | 146 | } |
147 | 147 | } |
148 | 148 | |
149 | | - // No more rows left |
150 | | - if ( !$row ) { |
151 | | - break; |
152 | | - } |
153 | | - |
154 | 149 | if ( $count > $limit ) { |
155 | 150 | // We've reached the one extra which shows that there are additional pages to be had. Stop here... |
156 | 151 | $this->setContinueEnumParameter( 'from', $this->keyToTitle( $row->user_name ) ); |