Index: trunk/extensions/ArticleAssessmentPilot/api/ApiArticleAssessment.php |
— | — | @@ -7,6 +7,7 @@ |
8 | 8 | public function execute() { |
9 | 9 | global $wgUser, $wgArticleAssessmentRatings; |
10 | 10 | $params = $this->extractRequestParams(); |
| 11 | + |
11 | 12 | $token = array(); |
12 | 13 | if ( $wgUser->isAnon() ) { |
13 | 14 | if ( !isset( $params['anontoken'] ) ) { |
— | — | @@ -181,11 +182,11 @@ |
182 | 183 | |
183 | 184 | foreach( $wgArticleAssessmentRatings as $rating ) { |
184 | 185 | $ret["r{$rating}"] = array( |
185 | | - ApiBase::PARAM_TYPE => 'integer', |
| 186 | + ApiBase::PARAM_TYPE => 'limit', |
186 | 187 | ApiBase::PARAM_DFLT => 0, |
187 | 188 | ApiBase::PARAM_MIN => 0, |
188 | 189 | ApiBase::PARAM_MAX => 5, |
189 | | - ApiBase::PARAM_RANGE_ENFORCE => false, |
| 190 | + ApiBase::PARAM_MAX2 => 5, |
190 | 191 | ); |
191 | 192 | } |
192 | 193 | return $ret; |
— | — | @@ -211,7 +212,7 @@ |
212 | 213 | } |
213 | 214 | |
214 | 215 | public function mustBePosted() { |
215 | | - return false; |
| 216 | + return true; |
216 | 217 | } |
217 | 218 | |
218 | 219 | public function isWriteMode() { |