diff options
Diffstat (limited to 'includes/api/ApiQueryImageInfo.php')
-rw-r--r-- | includes/api/ApiQueryImageInfo.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index d5da4951c358..94b4bbdb4853 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -373,7 +373,9 @@ class ApiQueryImageInfo extends ApiQueryBase { ); } $version = $opts['version']; - $vals = array(); + $vals = array( + ApiResult::META_TYPE => 'assoc', + ); // Timestamp is shown even if the file is revdelete'd in interface // so do same here. if ( isset( $prop['timestamp'] ) ) { @@ -397,7 +399,7 @@ class ApiQueryImageInfo extends ApiQueryBase { if ( $user || $userid ) { if ( $file->isDeleted( File::DELETED_USER ) ) { - $vals['userhidden'] = ''; + $vals['userhidden'] = true; $anyHidden = true; } if ( $canShowField( File::DELETED_USER ) ) { @@ -408,7 +410,7 @@ class ApiQueryImageInfo extends ApiQueryBase { $vals['userid'] = $file->getUser( 'id' ); } if ( !$file->getUser( 'id' ) ) { - $vals['anon'] = ''; + $vals['anon'] = true; } } } @@ -438,7 +440,7 @@ class ApiQueryImageInfo extends ApiQueryBase { if ( $pcomment || $comment ) { if ( $file->isDeleted( File::DELETED_COMMENT ) ) { - $vals['commenthidden'] = ''; + $vals['commenthidden'] = true; $anyHidden = true; } if ( $canShowField( File::DELETED_COMMENT ) ) { @@ -469,7 +471,7 @@ class ApiQueryImageInfo extends ApiQueryBase { } if ( $file->isDeleted( File::DELETED_FILE ) ) { - $vals['filehidden'] = ''; + $vals['filehidden'] = true; $anyHidden = true; } |