Merge "Minor CSS cleanup for Vector and Monobook skins"
[lhc/web/wiklou.git] / includes / api / ApiFormatXml.php
index 183d48c..f9b85ef 100644 (file)
@@ -32,7 +32,6 @@ class ApiFormatXml extends ApiFormatBase {
 
        private $mRootElemName = 'api';
        public static $namespace = 'http://www.mediawiki.org/xml/api/';
-       private $mDoubleQuote = false;
        private $mIncludeNamespace = false;
        private $mXslt = null;
 
@@ -50,7 +49,6 @@ class ApiFormatXml extends ApiFormatBase {
 
        public function execute() {
                $params = $this->extractRequestParams();
-               $this->mDoubleQuote = $params['xmldoublequote'];
                $this->mIncludeNamespace = $params['includexmlnamespace'];
                $this->mXslt = $params['xslt'];
 
@@ -71,8 +69,7 @@ class ApiFormatXml extends ApiFormatBase {
                $this->printText(
                        self::recXmlPrint( $this->mRootElemName,
                                $data,
-                               $this->getIsHtml() ? - 2 : null,
-                               $this->mDoubleQuote
+                               $this->getIsHtml() ? - 2 : null
                        )
                );
        }
@@ -117,11 +114,10 @@ class ApiFormatXml extends ApiFormatBase {
         * @param $elemName
         * @param $elemValue
         * @param $indent
-        * @param $doublequote bool
         *
         * @return string
         */
-       public static function recXmlPrint( $elemName, $elemValue, $indent, $doublequote = false ) {
+       public static function recXmlPrint( $elemName, $elemValue, $indent ) {
                $retval = '';
                if ( !is_null( $indent ) ) {
                        $indent += 2;
@@ -134,9 +130,6 @@ class ApiFormatXml extends ApiFormatBase {
                if ( is_array( $elemValue ) ) {
                        if ( isset( $elemValue['*'] ) ) {
                                $subElemContent = $elemValue['*'];
-                               if ( $doublequote ) {
-                                       $subElemContent = Sanitizer::encodeAttribute( $subElemContent );
-                               }
                                unset( $elemValue['*'] );
 
                                // Add xml:space="preserve" to the
@@ -157,10 +150,6 @@ class ApiFormatXml extends ApiFormatBase {
                        $indElements = array();
                        $subElements = array();
                        foreach ( $elemValue as $subElemId => & $subElemValue ) {
-                               if ( is_string( $subElemValue ) && $doublequote ) {
-                                       $subElemValue = Sanitizer::encodeAttribute( $subElemValue );
-                               }
-
                                if ( is_int( $subElemId ) ) {
                                        $indElements[] = $subElemValue;
                                        unset( $elemValue[$subElemId] );
@@ -226,7 +215,6 @@ class ApiFormatXml extends ApiFormatBase {
 
        public function getAllowedParams() {
                return array(
-                       'xmldoublequote' => false,
                        'xslt' => null,
                        'includexmlnamespace' => false,
                );
@@ -234,7 +222,6 @@ class ApiFormatXml extends ApiFormatBase {
 
        public function getParamDescription() {
                return array(
-                       'xmldoublequote' => 'If specified, double quotes all attributes and content',
                        'xslt' => 'If specified, adds <xslt> as stylesheet. This should be a wiki page '
                                . 'in the MediaWiki namespace whose page name ends with ".xsl"',
                        'includexmlnamespace' => 'If specified, adds an XML namespace'