From 9c55586e575babc0d51e4eaf605df5afc3f0afaa Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 24 Jan 2008 13:16:34 +0000 Subject: [PATCH] Tweaking r30119: changing txt and dbg's MIME type to text and adding txtfm and dbgfm with HTML-escaped stuff. --- includes/api/ApiFormatDbg.php | 4 ++-- includes/api/ApiFormatTxt.php | 4 ++-- includes/api/ApiMain.php | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) 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; -- 2.20.1