r32824 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32823‎ | r32824 | r32825 >
Date:19:32, 5 April 2008
Author:btongminh
Status:old
Tags:
Comment:
(bug 11673) Return error 'unknown_action' in specified format
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiBase.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiMain.php
@@ -370,9 +370,8 @@
371371 /* If the help message is requested in the default (xmlfm) format,
372372 * tell the printer not to escape ampersands so that our links do
373373 * not break. */
374 - $params = $this->extractRequestParams();
375374 $printer->setUnescapeAmps ( ( $this->mAction == 'help' || $isError )
376 - && $params['format'] == ApiMain::API_DEFAULT_FORMAT );
 375+ && $this->getParameter('format') == ApiMain::API_DEFAULT_FORMAT );
377376
378377 $printer->initPrinter($isError);
379378
Index: trunk/phase3/includes/api/ApiBase.php
@@ -353,10 +353,10 @@
354354 /**
355355 * Get a value for the given parameter
356356 */
357 - protected function getParameter($paramName) {
 357+ protected function getParameter($paramName, $parseMaxLimit = true) {
358358 $params = $this->getAllowedParams();
359359 $paramSettings = $params[$paramName];
360 - return $this->getParameterFromSettings($paramName, $paramSettings);
 360+ return $this->getParameterFromSettings($paramName, $paramSettings, $parseMaxLimit);
361361 }
362362
363363 /**
Index: trunk/phase3/RELEASE-NOTES
@@ -194,6 +194,7 @@
195195 * (bug 11633) Explicitly convert redirect titles to strings due to PHP's
196196 very weak typing on array keys.
197197 * (bug 12136) Extend allowed characters in JSON callback to ][.'"_A-Za-z0-9
 198+* (bug 11673) Return error 'unknown_action' in specified format
198199
199200 === Languages updated in 1.13 ===
200201

Status & tagging log