Add cache update hook for flaggedrevs
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 22 Aug 2008 22:36:02 +0000 (22:36 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 22 Aug 2008 22:36:02 +0000 (22:36 +0000)
docs/hooks.txt
includes/HTMLCacheUpdate.php

index 927c827..ea46055 100644 (file)
@@ -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.
index 1f25021..eab082c 100644 (file)
@@ -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 ) {