From 599275035e22b36114324ed71d8b12a2438bea7e Mon Sep 17 00:00:00 2001 From: Fomafix Date: Sun, 11 Jun 2017 20:46:41 +0200 Subject: [PATCH] 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 --- includes/specials/SpecialNewimages.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() { -- 2.20.1