Mobrovac has uploaded a new change for review. https://gerrit.wikimedia.org/r/315634
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. Bug: T147516 Bug: T147977 Change-Id: Idc6efc894698606ba528f4bd67658267ed250862 --- M includes/api/ApiPurge.php 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/34/315634/1 diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php index 8bbd88d..8be523e 100644 --- a/includes/api/ApiPurge.php +++ b/includes/api/ApiPurge.php @@ -103,6 +103,11 @@ $updates = $content->getSecondaryDataUpdates( $title, null, $forceRecursiveLinkUpdate, $p_result ); foreach ( $updates as $update ) { + # Some extensions, like EventBus, need to know the user + # that performed the purge action, so set it here + if ( $update instanceof LinksUpdate ) { + $update->setTriggeringUser( $user ); + } DeferredUpdates::addUpdate( $update, DeferredUpdates::PRESEND ); } -- To view, visit https://gerrit.wikimedia.org/r/315634 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: wmf/1.28.0-wmf.22 Gerrit-Owner: Mobrovac <mobro...@wikimedia.org> Gerrit-Reviewer: Ppchelko <ppche...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits