diff --git a/includes/AbuseFilterHooks.php b/includes/AbuseFilterHooks.php index ff91234b9..22f4617f0 100644 --- a/includes/AbuseFilterHooks.php +++ b/includes/AbuseFilterHooks.php @@ -107,7 +107,7 @@ class AbuseFilterHooks { ) { $startTime = microtime( true ); - $filterResult = self::filterEdit( $context, $content, $summary, $slot ); + $filterResult = self::filterEdit( $context, $user, $content, $summary, $slot ); if ( !$filterResult->isOK() ) { // Produce a useful error message for API edits @@ -122,12 +122,16 @@ class AbuseFilterHooks { * Implementation for EditFilterMergedContent hook. * * @param IContextSource $context the context of the edit + * @param User $user * @param Content $content the new Content generated by the edit * @param string $summary Edit summary for page * @param string $slot slot role for the content * @return Status */ - public static function filterEdit( IContextSource $context, Content $content, + public static function filterEdit( + IContextSource $context, + User $user, + Content $content, $summary, $slot = SlotRecord::MAIN ) : Status { self::$lastEditPage = null; @@ -143,7 +147,6 @@ class AbuseFilterHooks { return Status::newGood(); } - $user = $context->getUser(); if ( $title->canExist() && $title->exists() ) { // Make sure we load the latest text saved in database (bug 31656) $page = $context->getWikiPage();