Index: trunk/phase3/includes/api/ApiQueryImageInfo.php |
— | — | @@ -475,22 +475,32 @@ |
476 | 476 | * @return Array |
477 | 477 | */ |
478 | 478 | public static function getPropertyNames() { |
| 479 | + return array_keys( self::getProperties() ); |
| 480 | + } |
| 481 | + |
| 482 | + /** |
| 483 | + * Returns array key value pairs of |
| 484 | + * |
| 485 | + * @static |
| 486 | + * @return array |
| 487 | + */ |
| 488 | + private static function getProperties() { |
479 | 489 | return array( |
480 | | - 'timestamp', |
481 | | - 'user', |
482 | | - 'userid', |
483 | | - 'comment', |
484 | | - 'parsedcomment', |
485 | | - 'url', |
486 | | - 'size', |
487 | | - 'dimensions', // For backwards compatibility with Allimages |
488 | | - 'sha1', |
489 | | - 'mime', |
490 | | - 'thumbmime', |
491 | | - 'mediatype', |
492 | | - 'metadata', |
493 | | - 'archivename', |
494 | | - 'bitdepth', |
| 490 | + 'timestamp' => ' timestamp - Adds timestamp for the uploaded version', |
| 491 | + 'user' => ' user - Adds the user who uploaded the image version', |
| 492 | + 'userid' => ' userid - Add the user ID that uploaded the image version', |
| 493 | + 'comment' => ' comment - Comment on the version', |
| 494 | + 'parsedcomment' => ' parsedcomment - Parse the comment on the version', |
| 495 | + 'url' => ' url - Gives URL to the image and the description page', |
| 496 | + 'size' => ' size - Adds the size of the image in bytes and the height, width and page count (if applicable)', |
| 497 | + 'dimensions' => ' dimensions - Alias for size', // For backwards compatibility with Allimages |
| 498 | + 'sha1' => ' sha1 - Adds SHA-1 hash for the image', |
| 499 | + 'mime' => ' mime - Adds MIME type of the image', |
| 500 | + 'thumbmime' => ' thumbmime - Adds MIME type of the image thumbnail (requires url)', |
| 501 | + 'mediatype' => ' mediatype - Adds the media type of the image', |
| 502 | + 'metadata' => ' metadata - Lists EXIF metadata for the version of the image', |
| 503 | + 'archivename' => ' archivename - Adds the file name of the archive version for non-latest versions', |
| 504 | + 'bitdepth' => ' bitdepth - Adds the bit depth of the version', |
495 | 505 | ); |
496 | 506 | } |
497 | 507 | |
— | — | @@ -501,24 +511,10 @@ |
502 | 512 | * @return array |
503 | 513 | */ |
504 | 514 | public static function getPropertyDescriptions() { |
505 | | - return array( |
506 | | - 'What image information to get:', |
507 | | - ' timestamp - Adds timestamp for the uploaded version', |
508 | | - ' user - Adds the user who uploaded the image version', |
509 | | - ' userid - Add the user ID that uploaded the image version', |
510 | | - ' comment - Comment on the version', |
511 | | - ' parsedcomment - Parse the comment on the version', |
512 | | - ' url - Gives URL to the image and the description page', |
513 | | - ' size - Adds the size of the image in bytes and the height, width and page count (if applicable)', |
514 | | - ' dimensions - Alias for size', |
515 | | - ' sha1 - Adds SHA-1 hash for the image', |
516 | | - ' mime - Adds MIME type of the image', |
517 | | - ' thumbmime - Adds MIME type of the image thumbnail (requires url)', |
518 | | - ' mediatype - Adds the media type of the image', |
519 | | - ' metadata - Lists EXIF metadata for the version of the image', |
520 | | - ' archivename - Adds the file name of the archive version for non-latest versions', |
521 | | - ' bitdepth - Adds the bit depth of the version', |
522 | | - ); |
| 515 | + return array_merge( |
| 516 | + array( 'What image information to get:' ), |
| 517 | + array_values( self::getProperties() ) |
| 518 | + ); |
523 | 519 | } |
524 | 520 | |
525 | 521 | /** |