From: Sam Reed Date: Sat, 19 Mar 2011 22:54:43 +0000 (+0000) Subject: * (bug 27343) Add parseddescription to list=filearchive X-Git-Tag: 1.31.0-rc.0~31310 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=b3ca74bd570f9662739f71b03d6c35b1397f5687;p=lhc%2Fweb%2Fwiklou.git * (bug 27343) Add parseddescription to list=filearchive --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 64154fb6b6..815c84e4f2 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/api/ApiQueryFilearchive.php b/includes/api/ApiQueryFilearchive.php index b791f176f5..fa888461f1 100644 --- a/includes/api/ApiQueryFilearchive.php +++ b/includes/api/ApiQueryFilearchive.php @@ -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', ), ); }