r84356 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84355‎ | r84356 | r84357 >
Date:22:54, 19 March 2011
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
* (bug 27343) Add parseddescription to list=filearchive
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryFilearchive.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryFilearchive.php
@@ -59,7 +59,7 @@
6060 $fld_user = isset( $prop['user'] );
6161 $fld_size = isset( $prop['size'] );
6262 $fld_dimensions = isset( $prop['dimensions'] );
63 - $fld_description = isset( $prop['description'] );
 63+ $fld_description = isset( $prop['description'] ) || isset( $prop['parseddescription'] );
6464 $fld_mime = isset( $prop['mime'] );
6565 $fld_metadata = isset( $prop['metadata'] );
6666 $fld_bitdepth = isset( $prop['bitdepth'] );
@@ -150,6 +150,11 @@
151151 }
152152 if ( $fld_description ) {
153153 $file['description'] = $row->fa_description;
 154+ if ( isset( $prop['parseddescription'] ) ) {
 155+ global $wgUser;
 156+ $file['parseddescription'] = $wgUser->getSkin()->formatComment(
 157+ $row->fa_description, $row->fa_name );
 158+ }
154159 }
155160 if ( $fld_metadata ) {
156161 $file['metadata'] = $row->fa_metadata
@@ -217,6 +222,7 @@
218223 'size',
219224 'dimensions',
220225 'description',
 226+ 'parseddescription',
221227 'mime',
222228 'metadata',
223229 'bitdepth'
@@ -234,15 +240,16 @@
235241 'limit' => 'How many images to return in total',
236242 'prop' => array(
237243 'What image information to get:',
238 - ' sha1 - Adds SHA-1 hash for the image',
239 - ' timestamp - Adds timestamp for the uploaded version',
240 - ' user - Adds user who uploaded the image version',
241 - ' size - Adds the size of the image in bytes and the height, width and page count (if applicable)',
242 - ' dimensions - Alias for size',
243 - ' description - Adds description the image version',
244 - ' mime - Adds MIME of the image',
245 - ' metadata - Lists EXIF metadata for the version of the image',
246 - ' bitdepth - Adds the bit depth of the version',
 244+ ' sha1 - Adds SHA-1 hash for the image',
 245+ ' timestamp - Adds timestamp for the uploaded version',
 246+ ' user - Adds user who uploaded the image version',
 247+ ' size - Adds the size of the image in bytes and the height, width and page count (if applicable)',
 248+ ' dimensions - Alias for size',
 249+ ' description - Adds description the image version',
 250+ ' parseddescription - Parse the description on the version',
 251+ ' mime - Adds MIME of the image',
 252+ ' metadata - Lists EXIF metadata for the version of the image',
 253+ ' bitdepth - Adds the bit depth of the version',
247254 ),
248255 );
249256 }
Index: trunk/phase3/RELEASE-NOTES
@@ -266,6 +266,7 @@
267267 * (bug 27585) add pagecount to list=filearchive
268268 * (bug 28104) Namespace for local pages in interwiki backlinks (iwbacklinks)
269269 is missing
 270+* (bug 27343) Add parseddescription to list=filearchive
270271
271272 === Languages updated in 1.18 ===
272273

Follow-up revisions

RevisionCommit summaryAuthorDate
r84809Followup r84356, don't pass title string, pass a title objectreedy18:46, 26 March 2011

Comments

#Comment by Bryan (talk | contribs)   18:42, 26 March 2011

The second argument to Linker::formatComment() is supposed to be a Title, not a string.

Status & tagging log