X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fapi%2FApiFormatJson.php;h=6d8e74309fb51ff96bb3b611e2854ba6e9b2816b;hb=6b3e5511fb848890f174690885e748b90389c0b8;hp=2e917e1a4fc5e009bc86034a34aa88cee01ff0f3;hpb=adae996840b9e782f6e14b21c433a83e37c3a74e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiFormatJson.php b/includes/api/ApiFormatJson.php index 2e917e1a4f..6d8e74309f 100644 --- a/includes/api/ApiFormatJson.php +++ b/includes/api/ApiFormatJson.php @@ -1,9 +1,5 @@ @gmail.com" * * This program is free software; you can redistribute it and/or modify @@ -84,14 +80,14 @@ class ApiFormatJson extends ApiFormatBase { break; default: - $this->dieUsage( __METHOD__ . - ': Unknown value for \'formatversion\'', 'unknownformatversion' ); + // Should have been caught during parameter validation + $this->dieDebug( __METHOD__, 'Unknown value for \'formatversion\'' ); } } $data = $this->getResult()->getResultData( null, $transform ); $json = FormatJson::encode( $data, $this->getIsHtml(), $opt ); - // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty bug in + // T68776: wfMangleFlashPolicy() is needed to avoid a nasty bug in // Flash, but what it does isn't friendly for the API, so we need to // work around it. if ( preg_match( '/\<\s*cross-domain-policy(?=\s|\>)/i', $json ) ) { @@ -103,7 +99,7 @@ class ApiFormatJson extends ApiFormatBase { if ( isset( $params['callback'] ) ) { $callback = preg_replace( "/[^][.\\'\\\"_A-Za-z0-9]/", '', $params['callback'] ); # Prepend a comment to try to avoid attacks against content - # sniffers, such as bug 68187. + # sniffers, such as T70187. $this->printText( "/**/$callback($json)" ); } else { $this->printText( $json );