From abaa9ae3f37684a2c09880bcc772a352d9c0da7e Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 13 May 2011 16:34:36 +0000 Subject: [PATCH] (bug 24781) Define XML namespace for API output. Also created the referenced URL on the cluster. --- includes/api/ApiFormatXml.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/api/ApiFormatXml.php b/includes/api/ApiFormatXml.php index 53a04dd32a..3f39eb9b43 100644 --- a/includes/api/ApiFormatXml.php +++ b/includes/api/ApiFormatXml.php @@ -36,6 +36,7 @@ if ( !defined( 'MEDIAWIKI' ) ) { class ApiFormatXml extends ApiFormatBase { private $mRootElemName = 'api'; + public static $namespace = 'http://www.mediawiki.org/xml/api/'; private $mDoubleQuote = false; private $mXslt = null; @@ -66,7 +67,7 @@ class ApiFormatXml extends ApiFormatBase { } $this->printText( self::recXmlPrint( $this->mRootElemName, - $this->getResultData(), + array( 'xmlns' => self::$namespace ) + $this->getResultData(), $this->getIsHtml() ? - 2 : null, $this->mDoubleQuote ) -- 2.20.1