Json mimetype is application/json
Change-Id: Ifd52bc2e4e9f80b8487e98f723dc05b103a39630
This commit is contained in:
@@ -43,12 +43,12 @@ class ApiULSLocalization extends ApiBase {
|
|||||||
$localPath = __DIR__ . "/../$filename";
|
$localPath = __DIR__ . "/../$filename";
|
||||||
if ( !file_exists( $localPath ) ) {
|
if ( !file_exists( $localPath ) ) {
|
||||||
$this->getResult()->addValue( null, 'text', '{}' );
|
$this->getResult()->addValue( null, 'text', '{}' );
|
||||||
$this->getResult()->addValue( null, 'mime', 'text/json' );
|
$this->getResult()->addValue( null, 'mime', 'application/json' );
|
||||||
} else {
|
} else {
|
||||||
$contents = file_get_contents( $localPath );
|
$contents = file_get_contents( $localPath );
|
||||||
// Output the file's contents raw
|
// Output the file's contents raw
|
||||||
$this->getResult()->addValue( null, 'text', $contents );
|
$this->getResult()->addValue( null, 'text', $contents );
|
||||||
$this->getResult()->addValue( null, 'mime', 'text/json' );
|
$this->getResult()->addValue( null, 'mime', 'application/json' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user