Hygiene: Instead of non-testable class_exists use ExtensionRegistry

Changes:
 - use ExtensionRegistry to check Disambiguator extension existence

Change-Id: Ibb1fa899fe3b07074ef5c69911d0b7a4e09336ae
This commit is contained in:
Piotr Miazga 2017-01-31 00:05:19 +01:00 committed by Sam Smith
parent 9a80069330
commit 8a3aa6fba8

View file

@ -45,7 +45,7 @@ class FooterHooks {
* @return boolean
*/
private static function isDisambiguationPage( Title $title ) {
return class_exists( 'DisambiguatorHooks' ) &&
return \ExtensionRegistry::getInstance()->isLoaded( 'Disambiguator' ) &&
DisambiguatorHooks::isDisambiguationPage( $title );
}