diff --git a/includes/HookHandlers/RelatedArticles.php b/includes/HookHandlers/RelatedArticles.php index e2aa413..3f7eb9f 100644 --- a/includes/HookHandlers/RelatedArticles.php +++ b/includes/HookHandlers/RelatedArticles.php @@ -39,8 +39,12 @@ public function __construct( Config $config, ILoadBalancer $loadBalancer ) { * @return bool */ private static function isDisambiguationPage( Title $title ) { - return \ExtensionRegistry::getInstance()->isLoaded( 'Disambiguator' ) && - \MediaWiki\Extension\Disambiguator\Hooks::isDisambiguationPage( $title ); + $services = MediaWikiServices::getInstance(); + if ( !$services->hasService( 'DisambiguatorLookup' ) ) { + return false; + } + return $services->getService( 'DisambiguatorLookup' ) + ->isDisambiguationPage( $title ); } /**