From ca6dc55a0d4ed1d9c20c23d6b83b73428f13c825 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 26 Aug 2010 22:09:29 +0000 Subject: [PATCH] * (bug 24724) list=allusers is out by 1 (shows total users - 1) --- RELEASE-NOTES | 1 + includes/api/ApiQueryAllUsers.php | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 916140481a..4b9b64794c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -372,6 +372,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Add format=dump and format=dumpfm, outputs results in PHP's var_dump() format * For required string parameters, if '' is provided, this is now classed as missing +* (bug 24724) list=allusers is out by 1 (shows total users - 1) === Languages updated in 1.17 === diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index a41f2a97d7..b60714c521 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -184,6 +184,15 @@ class ApiQueryAllUsers extends ApiQueryBase { } } + if ( is_array( $lastUserData ) ) { + $fit = $result->addValue( array( 'query', $this->getModuleName() ), + null, $lastUserData ); + if ( !$fit ) { + $this->setContinueEnumParameter( 'from', + $this->keyToTitle( $lastUserData['name'] ) ); + } + } + $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'u' ); } -- 2.20.1