r85276 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85275‎ | r85276 | r85277 >
Date:20:32, 3 April 2011
Author:reedy
Status:ok
Tags:
Comment:
Use API based range enforcing (avail in >= 1.17)
Modified paths:
  • /trunk/extensions/ArticleFeedback/api/ApiArticleFeedback.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/api/ApiArticleFeedback.php
@@ -330,12 +330,12 @@
331331
332332 foreach( $wgArticleFeedbackRatings as $rating ) {
333333 $ret["r{$rating}"] = array(
334 - ApiBase::PARAM_TYPE => 'limit',
 334+ ApiBase::PARAM_TYPE => 'integer',
335335 ApiBase::PARAM_REQUIRED => true,
336 - ApiBase::PARAM_DFLT => 0,
 336+ ApiBase::PARAM_ISMULTI => false,
 337+ ApiBase::PARAM_RANGE_ENFORCE => true,
337338 ApiBase::PARAM_MIN => 0,
338339 ApiBase::PARAM_MAX => 5,
339 - ApiBase::PARAM_MAX2 => 5,
340340 );
341341 }
342342 return $ret;

Status & tagging log