r47324 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47323‎ | r47324 | r47325 >
Date:17:47, 16 February 2009
Author:catrope
Status:ok
Tags:
Comment:
API: Fix yet another regression from r46845 that completely broke list=users. Patch by Brad Jorsch
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryUsers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryUsers.php
@@ -120,12 +120,19 @@
121121 // Second pass: add result data to $retval
122122 foreach($goodNames as $u) {
123123 if(!isset($data[$u]))
124 - $retval[] = array('name' => $u, 'missing' => '');
 124+ $data[$u] = array('name' => $u, 'missing' => '');
125125 else {
126126 if(isset($this->prop['groups']) && isset($data[$u]['groups']))
127127 $this->getResult()->setIndexedTagName($data[$u]['groups'], 'g');
128 - $retval[] = $data[$u];
129128 }
 129+ $fit = $result->addValue(array('query', $this->getModuleName()),
 130+ null, $data[$u]);
 131+ if(!$fit)
 132+ {
 133+ $this->setContinueEnumParameter('users',
 134+ implode('|', array_diff($users, $done)));
 135+ break;
 136+ }
130137 $done[] = $u;
131138 }
132139 return $this->getResult()->setIndexedTagName_internal(array('query', $this->getModuleName()), 'user');

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r46845* API: BREAKING CHANGE: (bug 11430) Return fewer results than the limit in so...catrope14:30, 5 February 2009

Status & tagging log