'sha1' => null,
'sha1base36' => null,
'prop' => array (
- ApiBase :: PARAM_TYPE => array(
- 'timestamp',
- 'user',
- 'comment',
- 'url',
- 'size',
- 'dimensions', // Obsolete
- 'mime',
- 'sha1',
- 'metadata',
- 'bitdepth',
- ),
+ ApiBase :: PARAM_TYPE => ApiQueryImageInfo::getPropertyNames(),
ApiBase :: PARAM_DFLT => 'timestamp|url',
ApiBase :: PARAM_ISMULTI => true
)
'prop' => array (
ApiBase :: PARAM_ISMULTI => true,
ApiBase :: PARAM_DFLT => 'timestamp|user',
- ApiBase :: PARAM_TYPE => array (
- 'timestamp',
- 'user',
- 'comment',
- 'url',
- 'size',
- 'sha1',
- 'mime',
- 'metadata',
- 'archivename',
- 'bitdepth',
- )
+ ApiBase :: PARAM_TYPE => self::getPropertyNames()
),
'limit' => array(
ApiBase :: PARAM_TYPE => 'limit',
'continue' => null,
);
}
+
+ /**
+ * Returns all possible parameters to iiprop
+ */
+ public static function getPropertyNames() {
+ return array (
+ 'timestamp',
+ 'user',
+ 'comment',
+ 'url',
+ 'size',
+ 'dimensions', // For backwards compatibility with Allimages
+ 'sha1',
+ 'mime',
+ 'metadata',
+ 'archivename',
+ 'bitdepth',
+ );
+ }
public function getParamDescription() {
return array (
// Append imageinfo to the result
//get all the image properties:
- $imParam = Array('timestamp',
- 'user',
- 'comment',
- 'url',
- 'size',
- 'sha1',
- 'mime',
- 'metadata',
- 'archivename',
- 'bitdepth');
+ $imParam = ApiQueryImageInfo::getPropertyNames();
$result['imageinfo'] = ApiQueryImageInfo::getInfo( $file,
array_flip( $imParam ),
$this->getResult() );