diff --git a/includes/FooterHooks.php b/includes/FooterHooks.php
index 54e6284f..862a9b79 100644
--- a/includes/FooterHooks.php
+++ b/includes/FooterHooks.php
@@ -34,19 +34,6 @@ class FooterHooks {
return true;
}
- /**
- * Uses the Disambiguator extension to test whether the page is a disambiguation page.
- *
- * If the Disambiguator extension isn't installed, then the test always fails, i.e. the page is
- * never a disambiguation page.
- *
- * @return boolean
- */
- private static function isDisambiguationPage( Title $title ) {
- return class_exists( 'DisambiguatorHooks' ) &&
- DisambiguatorHooks::isDisambiguationPage( $title );
- }
-
/**
* Handler for the BeforePageDisplay
hook.
*
@@ -54,12 +41,12 @@ class FooterHooks {
* to the output when:
*
*
$wgRelatedArticlesShowInFooter
is truthySkinMinervaBeta
true
*/
public static function onBeforePageDisplay( OutputPage $out, Skin $skin ) {
+ if ( class_exists( 'DisambiguatorHooks' ) &&
+ DisambiguatorHooks::isDisambiguationPage( $out->getTitle() ) ) {
+ return true;
+ }
$config = ConfigFactory::getDefaultInstance()->makeConfig( 'RelatedArticles' );
$showReadMore = $config->get( 'RelatedArticlesShowInFooter' );
@@ -75,8 +66,7 @@ class FooterHooks {
if (
$showReadMore &&
$title->inNamespace( NS_MAIN ) &&
- !$title->isMainPage() &&
- !self::isDisambiguationPage( $title )
+ !$title->isMainPage()
) {
if (
get_class( $skin ) === 'SkinMinervaBeta' ||