X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiFormatJson.php;h=be0b58b63b2a286836180fc740a7343c0a81db75;hb=aa5e15357aab7365815c154fd86bdaa6f968b97a;hp=342a580f9a4e5da58c38c3afb56fe5e34c2518aa;hpb=cfcbb5e3badb2d8867170e564b1467a229a13434;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiFormatJson.php b/includes/api/ApiFormatJson.php index 342a580f9a..be0b58b63b 100644 --- a/includes/api/ApiFormatJson.php +++ b/includes/api/ApiFormatJson.php @@ -43,6 +43,7 @@ class ApiFormatJson extends ApiFormatBase { if ( $params['callback'] ) { return 'text/javascript'; } + return 'application/json'; } @@ -80,16 +81,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(); } }