* (bug 14021) Removed titles= support from list=backlinks (has been obsolete for ages)
* (bug 13829) Expose parse tree via action=expandtemplates
* (bug 13606) Allow deletion of images
+* Added iiprop=mime and aiprop=metadata
=== Languages updated in 1.13 ===
private function run($resultPageSet = null) {
$repo = RepoGroup::singleton()->getLocalRepo();
- if ( !is_a( $repo, 'LocalRepo' ) )
+ if ( !$repo instanceof LocalRepo )
$this->dieUsage('Local file repository does not support querying all images', 'unsupportedrepo');
$db = $this->getDB();
$item['timestamp'] = wfTimestamp(TS_ISO_8601, $file->getTimestamp());
if(isset($prop['url']))
$item['url'] = $file->getFullUrl();
+ if(isset($prop['metadata']))
+ {
+ $metadata = unserialize($file->getMetadata());
+ $item['metadata'] = $metadata ? $metadata : null;
+ $this->getResult()->setIndexedTagName_recursive($item['metadata'], 'meta');
+ }
$data[] = $item;
} else {
$data[] = Title::makeTitle( NS_IMAGE, $row->img_name );
'size',
'dimensions',
'mime',
- 'sha1'
+ 'sha1',
+ 'metadata'
),
ApiBase :: PARAM_DFLT => 'timestamp|url',
ApiBase :: PARAM_ISMULTI => true
$this->fld_url = isset($prop['url']);
$this->fld_size = isset($prop['size']);
$this->fld_sha1 = isset($prop['sha1']);
+ $this->fld_mime = isset($prop['mime']);
$this->fld_metadata = isset($prop['metadata']);
$this->fld_archivename = isset($prop['archivename']);
$vals['comment'] = $f->getDescription();
if($this->fld_sha1)
$vals['sha1'] = wfBaseConvert($f->getSha1(), 36, 16, 40);
+ if($this->fld_mime)
+ $vals['mime'] = $f->getMimeType();
if($this->fld_metadata) {
$metadata = unserialize($f->getMetadata());
$vals['metadata'] = $metadata ? $metadata : null;
'url',
'size',
'sha1',
+ 'mime',
'metadata',
'archivename'
)