r87132 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87131‎ | r87132 | r87133 >
Date:20:52, 29 April 2011
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
* (bug 28238) paraminfo: output both limits for multi param
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiParamInfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiParamInfo.php
@@ -162,9 +162,8 @@
163163 }
164164 if ( isset( $p[ApiBase::PARAM_ISMULTI] ) && $p[ApiBase::PARAM_ISMULTI] ) {
165165 $a['multi'] = '';
166 - $a['limit'] = $this->getMain()->canApiHighLimits() ?
167 - ApiBase::LIMIT_SML2 :
168 - ApiBase::LIMIT_SML1;
 166+ $a['limit'] = ApiBase::LIMIT_SML1;
 167+ $a['highlimit'] = ApiBase::LIMIT_SML2;
169168 }
170169
171170 if ( isset( $p[ApiBase::PARAM_ALLOW_DUPLICATES] ) && $p[ApiBase::PARAM_ALLOW_DUPLICATES] ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -362,6 +362,7 @@
363363 * (bug 26882) Allow listing of indefinite protections with the API.
364364 * (bug 27344) add drprefix param to list=deletedrevs.
365365 * (bug 28560) list=deletedrevs should die, if combination of param is invalid.
 366+* (bug 28238) paraminfo: output both limits for multi param
366367
367368 === Languages updated in 1.18 ===
368369

Follow-up revisions

RevisionCommit summaryAuthorDate
r87138Followup r87132, per Bryan, still return the "limit" to be the current users ...reedy21:46, 29 April 2011

Comments

#Comment by Bryan (talk | contribs)   21:43, 29 April 2011

The most useful limit is still the old canApiHighLimits() conditional. I would use a separate return value 'lowlimit' and 'highlimit', and return the applicable limit as 'limit'. Also has as advantage that we're not sneaking in a slightly breaking change.

Status & tagging log