Replace deprecated ConfigFactory::getDefaultInstance

Bug: T325966
Change-Id: I2bbaa9d1a65e4f33cb9d919237d8664e3f74a51e
This commit is contained in:
Umherirrender 2022-12-27 20:53:14 +01:00
parent 105206403f
commit 4b479f6427

View file

@ -20,7 +20,6 @@
namespace MediaWiki\Extension\ImageMap; namespace MediaWiki\Extension\ImageMap;
use ConfigFactory;
use DOMDocumentFragment; use DOMDocumentFragment;
use DOMElement; use DOMElement;
use MediaWiki\Hook\ParserFirstCallInitHook; use MediaWiki\Hook\ParserFirstCallInitHook;
@ -57,7 +56,7 @@ class ImageMap implements ParserFirstCallInitHook {
*/ */
public function render( $input, $params, Parser $parser ) { public function render( $input, $params, Parser $parser ) {
global $wgUrlProtocols, $wgNoFollowLinks; global $wgUrlProtocols, $wgNoFollowLinks;
$config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' ); $config = MediaWikiServices::getInstance()->getMainConfig();
$enableLegacyMediaDOM = $config->get( 'ParserEnableLegacyMediaDOM' ); $enableLegacyMediaDOM = $config->get( 'ParserEnableLegacyMediaDOM' );
$lines = explode( "\n", $input ); $lines = explode( "\n", $input );