Index: trunk/phase3/includes/api/ApiQueryImageInfo.php |
— | — | @@ -329,10 +329,11 @@ |
330 | 330 | $sha1 = isset( $prop['sha1'] ); |
331 | 331 | $meta = isset( $prop['metadata'] ); |
332 | 332 | $mime = isset( $prop['mime'] ); |
| 333 | + $mediatype = isset( $prop['mediatype'] ); |
333 | 334 | $archive = isset( $prop['archivename'] ); |
334 | 335 | $bitdepth = isset( $prop['bitdepth'] ); |
335 | 336 | |
336 | | - if ( ( $url || $sha1 || $meta || $mime || $archive || $bitdepth ) |
| 337 | + if ( ( $url || $sha1 || $meta || $mime || $mediatype || $archive || $bitdepth ) |
337 | 338 | && $file->isDeleted( File::DELETED_FILE ) ) { |
338 | 339 | $vals['filehidden'] = ''; |
339 | 340 | |
— | — | @@ -380,6 +381,10 @@ |
381 | 382 | if ( $mime ) { |
382 | 383 | $vals['mime'] = $file->getMimeType(); |
383 | 384 | } |
| 385 | + |
| 386 | + if ( $mediatype ) { |
| 387 | + $vals['mediatype'] = $file->getMediaType(); |
| 388 | + } |
384 | 389 | |
385 | 390 | if ( $archive && $file->isOld() ) { |
386 | 391 | $vals['archivename'] = $file->getArchiveName(); |
— | — | @@ -482,6 +487,7 @@ |
483 | 488 | 'sha1', |
484 | 489 | 'mime', |
485 | 490 | 'thumbmime', |
| 491 | + 'mediatype', |
486 | 492 | 'metadata', |
487 | 493 | 'archivename', |
488 | 494 | 'bitdepth', |
— | — | @@ -508,6 +514,7 @@ |
509 | 515 | ' sha1 - Adds SHA-1 hash for the image', |
510 | 516 | ' mime - Adds MIME type of the image', |
511 | 517 | ' thumbmime - Adds MIME type of the image thumbnail (requires url)', |
| 518 | + ' mediatype - Adds the media type of the image', |
512 | 519 | ' metadata - Lists EXIF metadata for the version of the image', |
513 | 520 | ' archivename - Adds the file name of the archive version for non-latest versions', |
514 | 521 | ' bitdepth - Adds the bit depth of the version', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -204,6 +204,7 @@ |
205 | 205 | * (bug 27708) list=users does not have a property to return user id |
206 | 206 | * (bug 27715) imageinfo didn't respect revdelete |
207 | 207 | * (bug 27862) Useremail module didn't properly return success on success. |
| 208 | +* (bug 27590) prop=imageinfo now allows querying the media type |
208 | 209 | |
209 | 210 | === Languages updated in 1.18 === |
210 | 211 | |