* (bug 27343) Add parseddescription to list=filearchive
This commit is contained in:
parent
73fe21dce9
commit
b3ca74bd57
2 changed files with 18 additions and 10 deletions
|
|
@ -266,6 +266,7 @@ PHP if you have not done so prior to upgrading MediaWiki.
|
|||
* (bug 27585) add pagecount to list=filearchive
|
||||
* (bug 28104) Namespace for local pages in interwiki backlinks (iwbacklinks)
|
||||
is missing
|
||||
* (bug 27343) Add parseddescription to list=filearchive
|
||||
|
||||
=== Languages updated in 1.18 ===
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class ApiQueryFilearchive extends ApiQueryBase {
|
|||
$fld_user = isset( $prop['user'] );
|
||||
$fld_size = isset( $prop['size'] );
|
||||
$fld_dimensions = isset( $prop['dimensions'] );
|
||||
$fld_description = isset( $prop['description'] );
|
||||
$fld_description = isset( $prop['description'] ) || isset( $prop['parseddescription'] );
|
||||
$fld_mime = isset( $prop['mime'] );
|
||||
$fld_metadata = isset( $prop['metadata'] );
|
||||
$fld_bitdepth = isset( $prop['bitdepth'] );
|
||||
|
|
@ -150,6 +150,11 @@ class ApiQueryFilearchive extends ApiQueryBase {
|
|||
}
|
||||
if ( $fld_description ) {
|
||||
$file['description'] = $row->fa_description;
|
||||
if ( isset( $prop['parseddescription'] ) ) {
|
||||
global $wgUser;
|
||||
$file['parseddescription'] = $wgUser->getSkin()->formatComment(
|
||||
$row->fa_description, $row->fa_name );
|
||||
}
|
||||
}
|
||||
if ( $fld_metadata ) {
|
||||
$file['metadata'] = $row->fa_metadata
|
||||
|
|
@ -217,6 +222,7 @@ class ApiQueryFilearchive extends ApiQueryBase {
|
|||
'size',
|
||||
'dimensions',
|
||||
'description',
|
||||
'parseddescription',
|
||||
'mime',
|
||||
'metadata',
|
||||
'bitdepth'
|
||||
|
|
@ -234,15 +240,16 @@ class ApiQueryFilearchive extends ApiQueryBase {
|
|||
'limit' => 'How many images to return in total',
|
||||
'prop' => array(
|
||||
'What image information to get:',
|
||||
' sha1 - Adds SHA-1 hash for the image',
|
||||
' timestamp - Adds timestamp for the uploaded version',
|
||||
' user - Adds user who uploaded the image version',
|
||||
' size - Adds the size of the image in bytes and the height, width and page count (if applicable)',
|
||||
' dimensions - Alias for size',
|
||||
' description - Adds description the image version',
|
||||
' mime - Adds MIME of the image',
|
||||
' metadata - Lists EXIF metadata for the version of the image',
|
||||
' bitdepth - Adds the bit depth of the version',
|
||||
' sha1 - Adds SHA-1 hash for the image',
|
||||
' timestamp - Adds timestamp for the uploaded version',
|
||||
' user - Adds user who uploaded the image version',
|
||||
' size - Adds the size of the image in bytes and the height, width and page count (if applicable)',
|
||||
' dimensions - Alias for size',
|
||||
' description - Adds description the image version',
|
||||
' parseddescription - Parse the description on the version',
|
||||
' mime - Adds MIME of the image',
|
||||
' metadata - Lists EXIF metadata for the version of the image',
|
||||
' bitdepth - Adds the bit depth of the version',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue