r23118 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23117‎ | r23118 | r23119 >
Date:08:05, 20 June 2007
Author:aaron
Status:old
Tags:
Comment:
*Use makeList()
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -669,17 +669,12 @@
670670 }
671671
672672 static function parserInjectImageTimestamps( &$parser, &$text ) {
673 - $images = array();
674673 $parser->mOutput->mImageTimestamps = array();
675674 # Fetch the timestamps of the images
676675 if( !empty($parser->mOutput->mImages) ) {
677676 $dbr = wfGetDB( DB_SLAVE );
678 - foreach( $parser->mOutput->mImages as $name => $v ) {
679 - $safename = $dbr->strencode( $name );
680 - $images[] = "'$safename'";
681 - }
682677 $res = $dbr->select('image', array('img_name','img_timestamp'),
683 - array('img_name IN(' . implode(',',$images) . ')'),
 678+ array('img_name IN(' . $dbr->makeList( array_keys($parser->mOutput->mImages) ) . ')'),
684679 __METHOD__ );
685680
686681 while( $row = $dbr->fetchObject($res) ) {

Status & tagging log