From c1f9b1f7b1b77776192048005dcc66dcf3df2bfb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 27 Dec 2014 15:41:37 +0100 Subject: Update to MediaWiki 1.24.1 --- includes/api/ApiFormatJson.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'includes/api/ApiFormatJson.php') diff --git a/includes/api/ApiFormatJson.php b/includes/api/ApiFormatJson.php index 47d82124..d9f9d46a 100644 --- a/includes/api/ApiFormatJson.php +++ b/includes/api/ApiFormatJson.php @@ -32,7 +32,7 @@ class ApiFormatJson extends ApiFormatBase { private $mIsRaw; - public function __construct( $main, $format ) { + public function __construct( ApiMain $main, $format ) { parent::__construct( $main, $format ); $this->mIsRaw = ( $format === 'rawfm' ); } @@ -43,6 +43,7 @@ class ApiFormatJson extends ApiFormatBase { if ( $params['callback'] ) { return 'text/javascript'; } + return 'application/json'; } @@ -92,16 +93,18 @@ class ApiFormatJson extends ApiFormatBase { public function getParamDescription() { return array( - 'callback' => 'If specified, wraps the output into a given function call. For safety, all user-specific data will be restricted.', - 'utf8' => 'If specified, encodes most (but not all) non-ASCII characters as UTF-8 instead of replacing them with hexadecimal escape sequences.', + 'callback' => 'If specified, wraps the output into a given function ' . + 'call. For safety, all user-specific data will be restricted.', + 'utf8' => 'If specified, encodes most (but not all) non-ASCII ' . + 'characters as UTF-8 instead of replacing them with hexadecimal escape sequences.', ); } public function getDescription() { if ( $this->mIsRaw ) { return 'Output data with the debugging elements in JSON format' . parent::getDescription(); - } else { - return 'Output data in JSON format' . parent::getDescription(); } + + return 'Output data in JSON format' . parent::getDescription(); } } -- cgit v1.2.3-54-g00ecf