From: Roan Kattouw Date: Fri, 13 May 2011 16:34:36 +0000 (+0000) Subject: (bug 24781) Define XML namespace for API output. Also created the referenced URL... X-Git-Tag: 1.31.0-rc.0~30239 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=abaa9ae3f37684a2c09880bcc772a352d9c0da7e;p=lhc%2Fweb%2Fwiklou.git (bug 24781) Define XML namespace for API output. Also created the referenced URL on the cluster. --- 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 )