Replace deprecated ContentHandler::makeParserOptions()

Having a different ParserOptions for each content model isn't feasible
in an MCR world. And the only thing using this was Wikibase, which has
been fixed to do what it needs in a different way.

Bug: T194263
Change-Id: Ib8ed827012c7bd73fcdaa6c0c6edd44869c79f14
Depends-On: I01373b29ee25fa9346c6b0317155be4ccdc8c515
This commit is contained in:
Brad Jorsch 2018-07-11 12:34:25 -04:00
parent f8b957167e
commit 1bdc9aa6bb

View file

@ -210,7 +210,7 @@ class SpamBlacklistHooks {
// get the link from the not-yet-saved page content.
$content = ContentHandler::makeContent( $pageText, $title );
$parserOptions = $content->getContentHandler()->makeParserOptions( 'canonical' );
$parserOptions = ParserOptions::newCanonical( 'canonical' );
$output = $content->getParserOutput( $title, null, $parserOptions );
$links = array_keys( $output->getExternalLinks() );