public function doUpdate() {
Hooks::run( 'LinksUpdate', array( &$this ) );
$this->doIncrementalUpdate();
- Hooks::run( 'LinksUpdateComplete', array( &$this ) );
+
+ $that = $this;
+ $this->mDb->onTransactionIdle( function() use ( $that ) {
+ Hooks::run( 'LinksUpdateComplete', array( &$that ) );
+ } );
}
protected function doIncrementalUpdate() {
$inv = array( $inv );
}
foreach ( $inv as $table ) {
- $update = new HTMLCacheUpdate( $this->mTitle, $table );
- $update->doUpdate();
+ DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this->mTitle, $table ) );
}
}
}
} else {
$userInfo = false;
}
+
+ if ( $this->mRevision ) {
+ $triggeringRevisionId = $this->mRevision->getId();
+ } else {
+ $triggeringRevisionId = false;
+ }
+
return array(
'wiki' => $this->mDb->getWikiID(),
'job' => new JobSpecification(
'rootJobTimestamp' => $this->mParserOutput->getCacheTime(),
'useRecursiveLinksUpdate' => $this->mRecursive,
'triggeringUser' => $userInfo,
+ 'triggeringRevisionId' => $triggeringRevisionId,
),
array( 'removeDuplicates' => true ),
$this->getTitle()