Merge "Disable related articles on disambiguation pages"

This commit is contained in:
jenkins-bot 2016-08-29 19:32:46 +00:00 committed by Gerrit Code Review
commit 5fcea14d15

View file

@ -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' );