Merge "SpecialNewimages: Do not add the module when the special page is included"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 12 Jun 2017 06:13:10 +0000 (06:13 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 12 Jun 2017 06:13:10 +0000 (06:13 +0000)
includes/specials/SpecialNewimages.php

index 583d4f9..5fa0a73 100644 (file)
@@ -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() {