mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-11-24 00:05:50 +00:00
Merge "Disable related articles on disambiguation pages"
This commit is contained in:
commit
5fcea14d15
|
@ -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