From: Fomafix Date: Sun, 11 Jun 2017 18:46:41 +0000 (+0200) Subject: SpecialNewimages: Do not add the module when the special page is included X-Git-Tag: 1.31.0-rc.0~3014^2 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=599275035e22b36114324ed71d8b12a2438bea7e;p=lhc%2Fweb%2Fwiklou.git SpecialNewimages: Do not add the module when the special page is included When the special page is included with {{Special:NewImages}} the module 'mediawiki.special.newFiles' throws an error. This change loads the module 'mediawiki.special.newFiles' together with the form. Bug: T167601 Change-Id: I5a0589f62388292851664daf1ab5e63008556a64 --- diff --git a/includes/specials/SpecialNewimages.php b/includes/specials/SpecialNewimages.php index 583d4f9e7c..5fa0a735a4 100644 --- a/includes/specials/SpecialNewimages.php +++ b/includes/specials/SpecialNewimages.php @@ -34,7 +34,6 @@ class SpecialNewFiles extends IncludableSpecialPage { $this->outputHeader(); $out = $this->getOutput(); - $out->addModules( 'mediawiki.special.newFiles' ); $this->addHelpLink( 'Help:New images' ); $opts = new FormOptions(); @@ -149,6 +148,8 @@ class SpecialNewFiles extends IncludableSpecialPage { ->setMethod( 'get' ) ->prepareForm() ->displayForm( false ); + + $this->getOutput()->addModules( 'mediawiki.special.newFiles' ); } protected function getGroupName() {