X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdeferred%2FHTMLCacheUpdate.php;h=29846bfb77f829b57f759a0f708aaa4f2b242196;hb=f938f15bea1a27f098fc7a0f93673adba31d2efe;hp=db3790f7d348b3cf0efbd57b87389537c19c1bfc;hpb=d9a34ea8c09f790f557ea3017fe8c6ad1dca68ff;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/deferred/HTMLCacheUpdate.php b/includes/deferred/HTMLCacheUpdate.php index db3790f7d3..29846bfb77 100644 --- a/includes/deferred/HTMLCacheUpdate.php +++ b/includes/deferred/HTMLCacheUpdate.php @@ -26,7 +26,7 @@ * * @ingroup Cache */ -class HTMLCacheUpdate implements DeferrableUpdate { +class HTMLCacheUpdate extends DataUpdate { /** @var Title */ public $mTitle; @@ -36,14 +36,24 @@ class HTMLCacheUpdate implements DeferrableUpdate { /** * @param Title $titleTo * @param string $table + * @param string $causeAction Triggering action + * @param string $causeAgent Triggering user */ - function __construct( Title $titleTo, $table ) { + function __construct( + Title $titleTo, $table, $causeAction = 'unknown', $causeAgent = 'unknown' + ) { $this->mTitle = $titleTo; $this->mTable = $table; + $this->causeAction = $causeAction; + $this->causeAgent = $causeAgent; } public function doUpdate() { - $job = HTMLCacheUpdateJob::newForBacklinks( $this->mTitle, $this->mTable ); + $job = HTMLCacheUpdateJob::newForBacklinks( + $this->mTitle, + $this->mTable, + [ 'causeAction' => $this->getCauseAction(), 'causeAgent' => $this->getCauseAgent() ] + ); JobQueueGroup::singleton()->lazyPush( $job ); }