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
$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 );
}