summaryrefslogtreecommitdiff
path: root/includes/api/ApiFormatJson.php
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:12:12 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:12:12 -0400
commitc9aa36da061816dee256a979c2ff8d2ee41824d9 (patch)
tree29f7002b80ee984b488bd047dbbd80b36bf892e9 /includes/api/ApiFormatJson.php
parentb4274e0e33eafb5e9ead9d949ebf031a9fb8363b (diff)
parentd1ba966140d7a60cd5ae4e8667ceb27c1a138592 (diff)
Merge branch 'archwiki'
# Conflicts: # skins/ArchLinux.php # skins/ArchLinux/archlogo.gif
Diffstat (limited to 'includes/api/ApiFormatJson.php')
-rw-r--r--includes/api/ApiFormatJson.php13
1 files changed, 8 insertions, 5 deletions
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();
}
}