From 06d1b8087d3b5b52dde26cbd6249cba125888331 Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Sat, 5 Apr 2008 19:32:21 +0000 Subject: [PATCH] (bug 11673) Return error 'unknown_action' in specified format --- RELEASE-NOTES | 1 + includes/api/ApiBase.php | 4 ++-- includes/api/ApiMain.php | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3684ffb057..a79ea1da40 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 7a3bbfc140..24a0847b26 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -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); } /** diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index d93371096d..5c2c53d9fe 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -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); -- 2.20.1