From: Roan Kattouw Date: Thu, 24 Jan 2008 13:16:34 +0000 (+0000) Subject: Tweaking r30119: changing txt and dbg's MIME type to text and adding txtfm and dbgfm... X-Git-Tag: 1.31.0-rc.0~49799 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=9c55586e575babc0d51e4eaf605df5afc3f0afaa;p=lhc%2Fweb%2Fwiklou.git Tweaking r30119: changing txt and dbg's MIME type to text and adding txtfm and dbgfm with HTML-escaped stuff. --- diff --git a/includes/api/ApiFormatDbg.php b/includes/api/ApiFormatDbg.php index 98e94c6532..2b70bca936 100644 --- a/includes/api/ApiFormatDbg.php +++ b/includes/api/ApiFormatDbg.php @@ -38,11 +38,11 @@ class ApiFormatDbg extends ApiFormatBase { } public function getMimeType() { - return 'text/html'; + return 'text/text'; } public function execute() { - $this->printText($this->formatHTML(var_export($this->getResultData(), true))); + $this->printText(var_export($this->getResultData(), true)); } protected function getDescription() { diff --git a/includes/api/ApiFormatTxt.php b/includes/api/ApiFormatTxt.php index 819ae88a2c..625d428832 100644 --- a/includes/api/ApiFormatTxt.php +++ b/includes/api/ApiFormatTxt.php @@ -38,11 +38,11 @@ class ApiFormatTxt extends ApiFormatBase { } public function getMimeType() { - return 'text/html'; + return 'text/text'; } public function execute() { - $this->printText($this->formatHTML(print_r($this->getResultData(), true))); + $this->printText(print_r($this->getResultData(), true)); } protected function getDescription() { diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index e60cf25c45..fed2f3662c 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -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;