mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-11-14 19:31:34 +00:00
Disable related articles on disambiguation pages
Uses DisambiguatorHooks to prevent related pages module addition on disambiguation pages. Bug: T127068 Change-Id: I166712d7e5df26ad00c725f3e4fe23ec074b3329
This commit is contained in:
parent
505f865f2e
commit
cea66f6cda
|
@ -8,6 +8,7 @@ use ResourceLoader;
|
|||
use Skin;
|
||||
use ConfigFactory;
|
||||
use User;
|
||||
use DisambiguatorHooks;
|
||||
|
||||
class FooterHooks {
|
||||
|
||||
|
@ -52,6 +53,10 @@ class FooterHooks {
|
|||
* @return boolean Always <code>true</code>
|
||||
*/
|
||||
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' );
|
||||
|
||||
|
|
Loading…
Reference in a new issue