From d9022f63880ce039446fba8364f68e656b7bf4cb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 3 May 2012 13:01:35 +0200 Subject: Update to MediaWiki 1.19.0 --- includes/cache/HTMLCacheUpdate.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'includes/cache/HTMLCacheUpdate.php') diff --git a/includes/cache/HTMLCacheUpdate.php b/includes/cache/HTMLCacheUpdate.php index d542800d..11e2ae74 100644 --- a/includes/cache/HTMLCacheUpdate.php +++ b/includes/cache/HTMLCacheUpdate.php @@ -23,8 +23,7 @@ * * @ingroup Cache */ -class HTMLCacheUpdate -{ +class HTMLCacheUpdate implements DeferrableUpdate { /** * @var Title */ @@ -33,6 +32,12 @@ class HTMLCacheUpdate public $mTable, $mPrefix, $mStart, $mEnd; public $mRowsPerJob, $mRowsPerQuery; + /** + * @param $titleTo + * @param $table + * @param $start bool + * @param $end bool + */ function __construct( $titleTo, $table, $start = false, $end = false ) { global $wgUpdateRowsPerJob, $wgUpdateRowsPerQuery; @@ -138,6 +143,9 @@ class HTMLCacheUpdate Job::batchInsert( $jobs ); } + /** + * @return mixed + */ protected function insertJobs() { $batches = $this->mCache->partition( $this->mTable, $this->mRowsPerJob ); if ( !$batches ) { @@ -157,6 +165,7 @@ class HTMLCacheUpdate /** * Invalidate an array (or iterator) of Title objects, right now + * @param $titleArray array */ protected function invalidateTitles( $titleArray ) { global $wgUseFileCache, $wgUseSquid; @@ -179,7 +188,7 @@ class HTMLCacheUpdate foreach ( $batches as $batch ) { $dbw->update( 'page', array( 'page_touched' => $timestamp ), - array( 'page_id IN (' . $dbw->makeList( $batch ) . ')' ), + array( 'page_id' => $batch ), __METHOD__ ); } @@ -197,9 +206,9 @@ class HTMLCacheUpdate } } } - } + /** * Job wrapper for HTMLCacheUpdate. Gets run whenever a related * job gets called from the queue. -- cgit v1.2.2