*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*/
}
if ( $params['witheditsonly'] ) {
- $this->addWhere( 'user_editcount > 0' );
+ $this->addWhere( 'u1.user_editcount > 0' );
}
if ( $fld_groups ) {
// 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 ) {
+ if ( $lastUser !== $row->user_name ) {
// Save the last pass's user data
if ( is_array( $lastUserData ) ) {
$fit = $result->addValue( array( 'query', $this->getModuleName() ),
}
}
- // 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 ) );
}
}
- $db->freeResult( $res );
-
$result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'u' );
}
'group' => 'Limit users to a given group name',
'prop' => array(
'What pieces of information to include.',
+ ' blockinfo - Adds the information about a current block on the user',
+ ' groups - Lists groups that the user is in',
+ ' editcount - Adds the edit count of the user',
+ ' registration - Adds the timestamp of when the user registered',
'`groups` property uses more server resources and may return fewer results than the limit' ),
'limit' => 'How many total user names to return',
'witheditsonly' => 'Only list users who have made edits',