Disable addHelpLink when including special pages
authorFomafix <fomafix@googlemail.com>
Sun, 11 Jun 2017 19:31:36 +0000 (21:31 +0200)
committerFomafix <fomafix@googlemail.com>
Sun, 11 Jun 2017 21:26:38 +0000 (21:26 +0000)
The help link does not make sence on includes special pages and is not
shown. But the style module 'mediawiki.helplink' is still loaded.
This change disables the loading of the module 'mediawiki.helplink' for
included special pages.

Change-Id: I8115dc2e46f3498441c30caede4648d387d55d5d

includes/specialpage/SpecialPage.php

index ba58e92..e861afe 100644 (file)
@@ -783,6 +783,10 @@ class SpecialPage {
         * @since 1.25
         */
        public function addHelpLink( $to, $overrideBaseUrl = false ) {
+               if ( $this->including() ) {
+                       return;
+               }
+
                global $wgContLang;
                $msg = $this->msg( $wgContLang->lc( $this->getName() ) . '-helppage' );