Tweaking r30119: changing txt and dbg's MIME type to text and adding txtfm and dbgfm...
authorRoan Kattouw <catrope@users.mediawiki.org>
Thu, 24 Jan 2008 13:16:34 +0000 (13:16 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Thu, 24 Jan 2008 13:16:34 +0000 (13:16 +0000)
includes/api/ApiFormatDbg.php
includes/api/ApiFormatTxt.php
includes/api/ApiMain.php

index 98e94c6..2b70bca 100644 (file)
@@ -38,11 +38,11 @@ class ApiFormatDbg extends ApiFormatBase {
        }\r
 \r
        public function getMimeType() {\r
-               return 'text/html';\r
+               return 'text/text';\r
        }\r
 \r
        public function execute() {\r
-               $this->printText($this->formatHTML(var_export($this->getResultData(), true)));\r
+               $this->printText(var_export($this->getResultData(), true));\r
        }\r
 \r
        protected function getDescription() {\r
index 819ae88..625d428 100644 (file)
@@ -38,11 +38,11 @@ class ApiFormatTxt extends ApiFormatBase {
        }\r
 \r
        public function getMimeType() {\r
-               return 'text/html';\r
+               return 'text/text';\r
        }\r
 \r
        public function execute() {\r
-               $this->printText($this->formatHTML(print_r($this->getResultData(), true)));\r
+               $this->printText(print_r($this->getResultData(), true));\r
        }\r
 \r
        protected function getDescription() {\r
index e60cf25..fed2f36 100644 (file)
@@ -91,7 +91,9 @@ class ApiMain extends ApiBase {
                'yamlfm' => 'ApiFormatYaml',
                'rawfm' => 'ApiFormatJson',
                'txt' => 'ApiFormatTxt',
-               'dbg' => 'ApiFormatDbg'
+               'txtfm' => 'ApiFormatTxt',
+               'dbg' => 'ApiFormatDbg',
+               'dbgfm' => 'ApiFormatDbg'
        );
 
        private $mPrinter, $mModules, $mModuleNames, $mFormats, $mFormatNames;