From b7796a0debb13340b603c207a4ffc41ec6cd9d3e Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Mon, 15 Dec 2014 09:38:11 -0800 Subject: [PATCH] SpecialImport: Don't access $this->getConfig() in the constructor The context is only set later on, so call it in the main execute() function. Bug: T73376 Change-Id: I34229877df6a8960756565f7df1d680aa8951cba --- includes/specials/SpecialImport.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index da2df2ddea..c6ebaed3a6 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -47,7 +47,6 @@ class SpecialImport extends SpecialPage { */ public function __construct() { parent::__construct( 'Import', 'import' ); - $this->namespace = $this->getConfig()->get( 'ImportTargetNamespace' ); } /** @@ -58,6 +57,8 @@ class SpecialImport extends SpecialPage { $this->setHeaders(); $this->outputHeader(); + $this->namespace = $this->getConfig()->get( 'ImportTargetNamespace' ); + $this->getOutput()->addModules( 'mediawiki.special.import' ); $user = $this->getUser(); -- 2.20.1