}
}
+ $canonicaltitle = isset( $prop['canonicaltitle'] );
$url = isset( $prop['url'] );
$sha1 = isset( $prop['sha1'] );
$meta = isset( $prop['metadata'] );
$bitdepth = isset( $prop['bitdepth'] );
$uploadwarning = isset( $prop['uploadwarning'] );
- if ( ( $url || $sha1 || $meta || $mime || $mediatype || $archive || $bitdepth )
+ if ( ( $canonicaltitle || $url || $sha1 || $meta || $mime || $mediatype || $archive || $bitdepth )
&& $file->isDeleted( File::DELETED_FILE )
) {
$vals['filehidden'] = '';
return $vals;
}
+ if ( $canonicaltitle ) {
+ $vals['canonicaltitle'] = $file->getTitle()->getPrefixedText();
+ }
+
if ( $url ) {
if ( !is_null( $thumbParams ) ) {
$mto = $file->transform( $thumbParams );
'userid' => ' userid - Add the user ID that uploaded the image version',
'comment' => ' comment - Comment on the version',
'parsedcomment' => ' parsedcomment - Parse the comment on the version',
+ 'canonicaltitle' => ' canonicaltitle - Adds the canonical title of the image file',
'url' => ' url - Gives URL to the image and the description page',
'size' => ' size - Adds the size of the image in bytes ' .
'and the height, width and page count (if applicable)',
ApiBase::PROP_NULLABLE => true
)
),
+ 'canonicaltitle' => array(
+ 'canonicaltitle' => array(
+ ApiBase::PROP_TYPE => 'string',
+ ApiBase::PROP_NULLABLE => true
+ )
+ ),
'url' => array(
'filehidden' => 'boolean',
'thumburl' => array(