Ppchelko has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315575

Change subject: ApiPurge: Set the triggering user for the LinksUpdate
......................................................................

ApiPurge: Set the triggering user for the LinksUpdate

Even if the API call was done anonymously, we still have the IP
address to set as a triggering user. This is needed in the EventBus
since the LinksUpdate job triggers a page-properties-change event
and we need information about the performer for each page-related
event.

Change-Id: Idc6efc894698606ba528f4bd67658267ed250862
---
M includes/api/ApiPurge.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/75/315575/1

diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php
index 8bbd88d..dd70e80 100644
--- a/includes/api/ApiPurge.php
+++ b/includes/api/ApiPurge.php
@@ -103,6 +103,9 @@
                                                $updates = 
$content->getSecondaryDataUpdates(
                                                        $title, null, 
$forceRecursiveLinkUpdate, $p_result );
                                                foreach ( $updates as $update ) 
{
+                                                       if ( $update instanceof 
LinksUpdate ) {
+                                                               
$update->setTriggeringUser( $user );
+                                                       }
                                                        
DeferredUpdates::addUpdate( $update, DeferredUpdates::PRESEND );
                                                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/315575
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc6efc894698606ba528f4bd67658267ed250862
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ppchelko <ppche...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to