*/
private $linkDeletions = null;
+ /**
+ * @var User|null
+ */
+ private $user;
+
/**
* Constructor
*
$this->mRevision = $revision;
}
+ /**
+ * Set the User who triggered this LinksUpdate
+ *
+ * @since 1.27
+ * @param User $user
+ */
+ public function setTriggeringUser( User $user ) {
+ $this->user = $user;
+ }
+
+ /**
+ * @since 1.27
+ * @return null|User
+ */
+ public function getTriggeringUser() {
+ return $this->user;
+ }
+
/**
* Invalidate any necessary link lists related to page property changes
* @param array $changed
}
public function getAsJobSpecification() {
+ if ( $this->user ) {
+ $userInfo = array(
+ 'userId' => $this->user->getId(),
+ 'userName' => $this->user->getName(),
+ );
+ } else {
+ $userInfo = false;
+ }
return array(
'wiki' => $this->mDb->getWikiID(),
'job' => new JobSpecification(
array(
// Reuse the parser cache if it was saved
'rootJobTimestamp' => $this->mParserOutput->getCacheTime(),
- 'useRecursiveLinksUpdate' => $this->mRecursive
+ 'useRecursiveLinksUpdate' => $this->mRecursive,
+ 'triggeringUser' => $userInfo,
),
array( 'removeDuplicates' => true ),
$this->getTitle()