Remove loading of module 'mediawiki.toc' in special pages
authorFomafix <fomafix@googlemail.com>
Sat, 20 Oct 2018 16:12:43 +0000 (18:12 +0200)
committerFomafix <fomafix@googlemail.com>
Sat, 20 Oct 2018 16:24:04 +0000 (18:24 +0200)
The module 'mediawiki.toc' is not needed anymore because it is
superseded by the style module 'mediawiki.toc.styles'.

In the skin the module 'mediawiki.toc' may be used by self-build TOCs
from the content.

Change-Id: I53cd6f222c77a1902b89913fe45c92c105dec022

includes/api/ApiHelp.php
includes/specials/SpecialEditWatchlist.php

index 72509c2..850cc6f 100644 (file)
@@ -101,7 +101,6 @@ class ApiHelp extends ApiBase {
                        'mediawiki.apihelp',
                ] );
                if ( !empty( $options['toc'] ) ) {
-                       $out->addModules( 'mediawiki.toc' );
                        $out->addModuleStyles( 'mediawiki.toc.styles' );
                }
                $out->setPageTitle( $context->msg( 'api-help-title' ) );
index 16cebe0..70b4207 100644 (file)
@@ -159,7 +159,6 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                        $out->addReturnTo( SpecialPage::getTitleFor( 'Watchlist' ) );
                } elseif ( $this->toc !== false ) {
                        $out->prependHTML( $this->toc );
-                       $out->addModules( 'mediawiki.toc' );
                        $out->addModuleStyles( 'mediawiki.toc.styles' );
                }
        }