Revert "Replace depricating method IContextSource::getWikiPage to WikiPageFactory usage"

This reverts commit 15fc159cb1.

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
This commit is contained in:
DannyS712 2021-07-04 05:50:06 +00:00
parent 15fc159cb1
commit 3f4430473e

View file

@ -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 );