From 508a3706d64390a82e232c2f35b0acad616d9f6a Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Sat, 14 Dec 2013 10:21:47 -0500 Subject: [PATCH] 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 --- SpamBlacklistHooks.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SpamBlacklistHooks.php b/SpamBlacklistHooks.php index 54f833cb..0ceb4fa0 100644 --- a/SpamBlacklistHooks.php +++ b/SpamBlacklistHooks.php @@ -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