X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fparser%2FParserFactory.php;h=bab1f364f6d21673c32df41404b6cadc65b2369c;hb=81aa6d7a758a000dcd110a2d4d21e50aca6d3444;hp=3d15e86fd5ce564e046721da7551d9236179ef67;hpb=bc22ecd0c0a0234349e2cc3aacdeef411431bf0b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/ParserFactory.php b/includes/parser/ParserFactory.php index 3d15e86fd5..bab1f364f6 100644 --- a/includes/parser/ParserFactory.php +++ b/includes/parser/ParserFactory.php @@ -19,6 +19,7 @@ * @ingroup Parser */ +use MediaWiki\BadFileLookup; use MediaWiki\Config\ServiceOptions; use MediaWiki\Linker\LinkRendererFactory; use MediaWiki\MediaWikiServices; @@ -54,6 +55,9 @@ class ParserFactory { /** @var LoggerInterface */ private $logger; + /** @var BadFileLookup */ + private $badFileLookup; + /** * Old parameter list, which we support for backwards compatibility, were: * array $parserConf See $wgParserConf documentation @@ -77,6 +81,7 @@ class ParserFactory { * @param LinkRendererFactory $linkRendererFactory * @param NamespaceInfo|LinkRendererFactory|null $nsInfo * @param LoggerInterface|null $logger + * @param BadFileLookup|null $badFileLookup * @since 1.32 */ public function __construct( @@ -87,7 +92,8 @@ class ParserFactory { SpecialPageFactory $spFactory, $linkRendererFactory, $nsInfo = null, - $logger = null + $logger = null, + BadFileLookup $badFileLookup = null ) { // @todo Do we need to retain compat for constructing this class directly? if ( !$nsInfo ) { @@ -119,6 +125,8 @@ class ParserFactory { $this->linkRendererFactory = $linkRendererFactory; $this->nsInfo = $nsInfo; $this->logger = $logger ?: new NullLogger(); + $this->badFileLookup = $badFileLookup ?? + MediaWikiServices::getInstance()->getBadFileLookup(); } /** @@ -135,7 +143,8 @@ class ParserFactory { $this->specialPageFactory, $this->linkRendererFactory, $this->nsInfo, - $this->logger + $this->logger, + $this->badFileLookup ); } }