mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SpamBlacklist
synced 2024-11-28 00:50:28 +00:00
Use WikiPage::prepareContentForEdit in SpamBlacklistHooks::filterMergedContent
Using WikiPage::prepareContentForEdit instead of Content::getParserOutput allows us to share the cached parser output with other hooks that run during the edit process. Note SpamBlacklistHooks::filterAPIEditBeforeSave already does this. Bug: 57026 Change-Id: I8c8b293af2842411fd95d3bc21e966a72b2a78b4
This commit is contained in:
parent
d709540dbd
commit
508a3706d6
|
@ -25,7 +25,8 @@ class SpamBlacklistHooks {
|
|||
}
|
||||
|
||||
// get the link from the not-yet-saved page content.
|
||||
$pout = $content->getParserOutput( $title );
|
||||
$editInfo = $context->getWikiPage()->prepareContentForEdit( $content );
|
||||
$pout = $editInfo->output;
|
||||
$links = array_keys( $pout->getExternalLinks() );
|
||||
|
||||
// HACK: treat the edit summary as a link
|
||||
|
|
Loading…
Reference in a new issue