From 88075a317808be45f83714d7b106292b486a5c3b Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 26 Feb 2009 10:11:53 +0000 Subject: [PATCH] API: (bug 17673) Using &exportnowrap without &export results in an internal error --- includes/api/ApiQuery.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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', ); } -- 2.20.1