*
* @return array
*/
- private static function getProperties() {
+ private static function getProperties( $modulePrefix = '' ) {
return array(
'timestamp' => ' timestamp - Adds timestamp for the uploaded version',
'user' => ' user - Adds the user who uploaded the image version',
'dimensions' => ' dimensions - Alias for size', // For backwards compatibility with Allimages
'sha1' => ' sha1 - Adds SHA-1 hash for the image',
'mime' => ' mime - Adds MIME type of the image',
- 'thumbmime' => ' thumbmime - Adds MIME type of the image thumbnail (requires url)',
+ 'thumbmime' => ' thumbmime - Adds MIME type of the image thumbnail' .
+ ' (requires url and param ' . $modulePrefix . 'urlwidth)',
'mediatype' => ' mediatype - Adds the media type of the image',
'metadata' => ' metadata - Lists EXIF metadata for the version of the image',
'archivename' => ' archivename - Adds the file name of the archive version for non-latest versions',
*
* @return array
*/
- public static function getPropertyDescriptions( $filter = array() ) {
+ public static function getPropertyDescriptions( $filter = array(), $modulePrefix = '' ) {
return array_merge(
array( 'What image information to get:' ),
- array_values( array_diff_key( self::getProperties(), array_flip( $filter ) ) )
+ array_values( array_diff_key( self::getProperties( $modulePrefix ), array_flip( $filter ) ) )
);
}
public function getParamDescription() {
$p = $this->getModulePrefix();
return array(
- 'prop' => self::getPropertyDescriptions(),
+ 'prop' => self::getPropertyDescriptions( array(), $p ),
'urlwidth' => array( "If {$p}prop=url is set, a URL to an image scaled to this width will be returned.",
'Only the current version of the image can be scaled' ),
'urlheight' => "Similar to {$p}urlwidth. Cannot be used without {$p}urlwidth",
public function getParamDescription() {
$p = $this->getModulePrefix();
return array(
- 'prop' => self::getPropertyDescriptions( $this->propertyFilter ),
+ 'prop' => self::getPropertyDescriptions( $this->propertyFilter, $p ),
'filekey' => 'Key that identifies a previous upload that was stashed temporarily.',
'sessionkey' => 'Alias for filekey, for backward compatibility.',
'urlwidth' => "If {$p}prop=url is set, a URL to an image scaled to this width will be returned.",