From: Aaron Schulz Date: Fri, 22 Aug 2008 22:36:02 +0000 (+0000) Subject: Add cache update hook for flaggedrevs X-Git-Tag: 1.31.0-rc.0~45709 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=d54064bfd6e360b15ff4843769ae9c3bc5b83316;p=lhc%2Fweb%2Fwiklou.git Add cache update hook for flaggedrevs --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 927c827195..ea460557e2 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -672,6 +672,9 @@ $result: User permissions error to add. If none, return true. 'getUserPermissionsErrorsExpensive': Absolutely the same, but is called only if expensive checks are enabled. +'HTMLCacheUpdate::doUpdate': After cache invalidation updates are inserted into the job queue. +$title: Title object, pages linked to this title are purged. + 'ImageBeforeProduceHTML': Called before producing the HTML created by a wiki image insertion. You can skip the default logic entirely by returning false, or just modify a few things using call-by-reference. diff --git a/includes/HTMLCacheUpdate.php b/includes/HTMLCacheUpdate.php index 1f250214bf..eab082c109 100644 --- a/includes/HTMLCacheUpdate.php +++ b/includes/HTMLCacheUpdate.php @@ -37,7 +37,7 @@ class HTMLCacheUpdate $this->mRowsPerQuery = $wgUpdateRowsPerQuery; } - function doUpdate() { + public function doUpdate() { # Fetch the IDs $cond = $this->getToCondition(); $dbr = wfGetDB( DB_SLAVE ); @@ -50,6 +50,7 @@ class HTMLCacheUpdate $this->invalidateIDs( $res ); } } + wfRunHooks( 'HTMLCacheUpdate::doUpdate', array($this->mTitle) ); } function insertJobs( ResultWrapper $res ) {