From 3f4430473e384403ac8daf42bb2abe6bb756efe5 Mon Sep 17 00:00:00 2001 From: DannyS712 Date: Sun, 4 Jul 2021 05:50:06 +0000 Subject: [PATCH] Revert "Replace depricating method IContextSource::getWikiPage to WikiPageFactory usage" This reverts commit 15fc159cb180a51f1b2ba608601271d51eb7417d. Reason for revert: this is breaking the addition of rev ids to filter hits after edits are saved. I suspect this is because the context wikipage is for a different title than the one being edited, though I'm not sure way - regardless, testing on patchdemo shows that with this revert is applied, rev ids are once again added to filter hits. Bug: T286140 Change-Id: I3ab6324a73050154cef1c20a2bf8307eb11eea2d --- includes/AbuseFilterHooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/AbuseFilterHooks.php b/includes/AbuseFilterHooks.php index 8e08b6dc1..07c1f3758 100644 --- a/includes/AbuseFilterHooks.php +++ b/includes/AbuseFilterHooks.php @@ -92,7 +92,7 @@ class AbuseFilterHooks { return Status::newGood(); } - $page = MediaWikiServices::getInstance()->getWikiPageFactory()->newFromTitle( $title ); + $page = $context->getWikiPage(); $builder = AbuseFilterServices::getVariableGeneratorFactory()->newRunGenerator( $user, $title ); $vars = $builder->getEditVars( $content, $text, $summary, $slot, $page );