Fix issues identified by SpaceBeforeSingleLineComment sniff
[lhc/web/wiklou.git] / includes / api / ApiQueryImageInfo.php
index 02846dc..c769024 100644 (file)
@@ -480,7 +480,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
                }
 
                if ( !$canShowField( File::DELETED_FILE ) ) {
-                       //Early return, tidier than indenting all following things one level
+                       // Early return, tidier than indenting all following things one level
                        return $vals;
                }
 
@@ -523,9 +523,9 @@ class ApiQueryImageInfo extends ApiQueryBase {
                }
 
                if ( $meta ) {
-                       wfSuppressWarnings();
+                       MediaWiki\suppressWarnings();
                        $metadata = unserialize( $file->getMetadata() );
-                       wfRestoreWarnings();
+                       MediaWiki\restoreWarnings();
                        if ( $metadata && $version !== 'latest' ) {
                                $metadata = $file->convertMetadataVersion( $metadata, $version );
                        }
@@ -592,7 +592,10 @@ class ApiQueryImageInfo extends ApiQueryBase {
                $retval = array();
                if ( is_array( $metadata ) ) {
                        foreach ( $metadata as $key => $value ) {
-                               $r = array( 'name' => $key );
+                               $r = array(
+                                       'name' => $key,
+                                       ApiResult::META_BC_BOOLS => array( 'value' ),
+                               );
                                if ( is_array( $value ) ) {
                                        $r['value'] = self::processMetaData( $value, $result );
                                } else {