From 22832a2527a1a246c6b1c7dcc53e73f846410cfd Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Tue, 4 Jan 2011 04:05:32 +0000 Subject: [PATCH] * (bug 26560) On allusers if limit < total number of users, last user gets duplicate If $lastUserData is set to null, it won't get added again! --- RELEASE-NOTES | 1 + includes/api/ApiQueryAllUsers.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index cb7f87bdd5..b658200506 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -69,6 +69,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 25767) Add userrights properties to allusers and users query lists * (bug 26558) list=allusers auprop=groups does not list groups a user is automatically a member of * (bug 26559) list=allusers auprop=rights does not match list=users usprop=rights +* (bug 26560) On allusers if limit < total number of users, last user gets duplicate === Languages updated in 1.18 === diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index 2042e680cf..0055ba42fc 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -160,6 +160,9 @@ class ApiQueryAllUsers extends ApiQueryBase { if ( is_array( $lastUserData ) ) { $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $lastUserData ); + + $lastUserData = null; + if ( !$fit ) { $this->setContinueEnumParameter( 'from', $this->keyToTitle( $lastUserData['name'] ) ); -- 2.20.1