From: Roan Kattouw Date: Thu, 26 Feb 2009 10:11:53 +0000 (+0000) Subject: API: (bug 17673) Using &exportnowrap without &export results in an internal error X-Git-Tag: 1.31.0-rc.0~42673 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=88075a317808be45f83714d7b106292b486a5c3b;p=lhc%2Fweb%2Fwiklou.git API: (bug 17673) Using &exportnowrap without &export results in an internal error --- diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index 44daf135c9..75792ff6c7 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -173,7 +173,8 @@ class ApiQuery extends ApiBase { public function getCustomPrinter() { // If &exportnowrap is set, use the raw formatter - if ($this->getParameter('exportnowrap')) + if ($this->getParameter('export') && + $this->getParameter('exportnowrap')) return new ApiFormatRaw($this->getMain()); else return null; @@ -556,7 +557,7 @@ class ApiQuery extends ApiBase { 'redirects' => 'Automatically resolve redirects', 'indexpageids' => 'Include an additional pageids section listing all returned page IDs.', 'export' => 'Export the current revisions of all given or generated pages', - 'exportnowrap' => 'Return the export XML without wrapping it in an XML result', + 'exportnowrap' => 'Return the export XML without wrapping it in an XML result. Can only be used with export', ); }