(bug 11673) Return error 'unknown_action' in specified format
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Sat, 5 Apr 2008 19:32:21 +0000 (19:32 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Sat, 5 Apr 2008 19:32:21 +0000 (19:32 +0000)
RELEASE-NOTES
includes/api/ApiBase.php
includes/api/ApiMain.php

index 3684ffb..a79ea1d 100644 (file)
@@ -194,6 +194,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 11633) Explicitly convert redirect titles to strings due to PHP's
   very weak typing on array keys.
 * (bug 12136) Extend allowed characters in JSON callback to ][.'"_A-Za-z0-9
+* (bug 11673) Return error 'unknown_action' in specified format
 
 === Languages updated in 1.13 ===
 
index 7a3bbfc..24a0847 100644 (file)
@@ -353,10 +353,10 @@ abstract class ApiBase {
        /**
         * Get a value for the given parameter 
         */
-       protected function getParameter($paramName) {
+       protected function getParameter($paramName, $parseMaxLimit = true) {
                $params = $this->getAllowedParams();
                $paramSettings = $params[$paramName];
-               return $this->getParameterFromSettings($paramName, $paramSettings);
+               return $this->getParameterFromSettings($paramName, $paramSettings, $parseMaxLimit);
        }
 
        /**
index d933710..5c2c53d 100644 (file)
@@ -370,9 +370,8 @@ class ApiMain extends ApiBase {
                /* If the help message is requested in the default (xmlfm) format,
                 * tell the printer not to escape ampersands so that our links do
                 * not break. */
-               $params = $this->extractRequestParams();
                $printer->setUnescapeAmps ( ( $this->mAction == 'help' || $isError ) 
-                               && $params['format'] == ApiMain::API_DEFAULT_FORMAT );
+                               && $this->getParameter('format') == ApiMain::API_DEFAULT_FORMAT );
 
                $printer->initPrinter($isError);