r75252 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75251‎ | r75252 | r75253 >
Date:15:40, 23 October 2010
Author:btongminh
Status:ok
Tags:
Comment:
Added iiprop=parsedcomment to prop=imageinfo, similar to prop=revisions
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryImageInfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryImageInfo.php
@@ -242,6 +242,12 @@
243243 if ( isset( $prop['comment'] ) ) {
244244 $vals['comment'] = $file->getDescription();
245245 }
 246+ if ( isset( $prop['parsedcomment'] ) ) {
 247+ global $wgUser;
 248+ $vals['parsedcomment'] = $wgUser->getSkin()->formatComment(
 249+ $file->getDescription(), $file->getTitle() );
 250+ }
 251+
246252 if ( isset( $prop['sha1'] ) ) {
247253 $vals['sha1'] = wfBaseConvert( $file->getSha1(), 36, 16, 40 );
248254 }
@@ -337,6 +343,7 @@
338344 'user',
339345 'userid',
340346 'comment',
 347+ 'parsedcomment',
341348 'url',
342349 'size',
343350 'dimensions', // For backwards compatibility with Allimages
@@ -354,19 +361,20 @@
355362 return array(
356363 'prop' => array(
357364 'What image information to get:',
358 - ' timestamp - Adds timestamp for the uploaded version',
359 - ' user - Adds the user who uploaded the image version',
360 - ' userid - Add the user id that uploaded the image version',
361 - ' comment - Comment on the version',
362 - ' url - Gives URL to the image and the description page',
363 - ' size - Adds the size of the image in bytes and the height and width',
364 - ' dimensions - Alias for size',
365 - ' sha1 - Adds sha1 hash for the image',
366 - ' mime - Adds MIME of the image',
367 - ' thumbmime - Adss MIME of the image thumbnail (requires url)',
368 - ' metadata - Lists EXIF metadata for the version of the image',
369 - ' archivename - Adds the file name of the archive version for non-latest versions',
370 - ' bitdepth - Adds the bit depth of the version',
 365+ ' timestamp - Adds timestamp for the uploaded version',
 366+ ' user - Adds the user who uploaded the image version',
 367+ ' userid - Add the user id that uploaded the image version',
 368+ ' comment - Comment on the version',
 369+ ' parsedcomment - Parse the comment on the version',
 370+ ' url - Gives URL to the image and the description page',
 371+ ' size - Adds the size of the image in bytes and the height and width',
 372+ ' dimensions - Alias for size',
 373+ ' sha1 - Adds sha1 hash for the image',
 374+ ' mime - Adds MIME of the image',
 375+ ' thumbmime - Adss MIME of the image thumbnail (requires url)',
 376+ ' metadata - Lists EXIF metadata for the version of the image',
 377+ ' archivename - Adds the file name of the archive version for non-latest versions',
 378+ ' bitdepth - Adds the bit depth of the version',
371379 ),
372380 'limit' => 'How many image revisions to return',
373381 'start' => 'Timestamp to start listing from',
Index: trunk/phase3/RELEASE-NOTES
@@ -435,6 +435,7 @@
436436 if integer out of range (breaking change!)
437437 * (bug 24792) API help for action=purge sometimes wrongly stated whether a
438438 POST request was needed due to cache pollution
 439+* Added iiprop=parsedcomment to prop=imageinfo, similar to prop=revisions
439440
440441 === Languages updated in 1.17 ===
441442

Status & tagging log