r97536 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97535‎ | r97536 | r97537 >
Date:18:46, 19 September 2011
Author:reedy
Status:ok
Tags:
Comment:
Simplify array( 'page_id IN (' . $dbw->makeList( $batch ) . ')' ), to array( 'page_id' => $batch ),
Modified paths:
  • /trunk/phase3/includes/cache/HTMLCacheUpdate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/cache/HTMLCacheUpdate.php
@@ -52,7 +52,7 @@
5353
5454 if ( $this->mTable === 'globaltemplatelinks' ) {
5555 global $wgEnableInterwikiTemplatesTracking;
56 -
 56+
5757 if ( $wgEnableInterwikiTemplatesTracking ) {
5858 $distantPageArray = $this->mCache->getDistantTemplateLinks( 'globaltemplatelinks' );
5959 $this->invalidateDistantTitles( $distantPageArray );
@@ -189,7 +189,7 @@
190190 foreach ( $batches as $batch ) {
191191 $dbw->update( 'page',
192192 array( 'page_touched' => $timestamp ),
193 - array( 'page_id IN (' . $dbw->makeList( $batch ) . ')' ),
 193+ array( 'page_id' => $batch ),
194194 __METHOD__
195195 );
196196 }
@@ -213,7 +213,7 @@
214214 */
215215 protected function invalidateDistantTitles( $distantPageArray ) {
216216 global $wgUseSquid;
217 -
 217+
218218 $pagesByWiki = array();
219219 $titleArray = array();
220220 # Sort by WikiID in $pagesByWiki
@@ -239,7 +239,7 @@
240240 );
241241 }
242242 }
243 -
 243+
244244 # Update squid
245245 if ( $wgUseSquid ) {
246246 $u = SquidUpdate::newFromTitles( $titleArray );

Status & tagging log