From 785e2dd6f0b822f22983273c59f1962d76162faf Mon Sep 17 00:00:00 2001 From: Platonides Date: Sun, 23 Jan 2011 22:49:55 +0000 Subject: [PATCH] $wgNoDBParam is tested in loadWikimediaSettings(), before execute() but after constructing the object. This should get rid of the need of adding a literal '--wiki=aawiki' http://wikitech.wikimedia.org/index.php?title=Add_a_wiki&diff=31536&oldid=31528 --- maintenance/addwiki.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/maintenance/addwiki.php b/maintenance/addwiki.php index 53699f227a..cccef15ad0 100644 --- a/maintenance/addwiki.php +++ b/maintenance/addwiki.php @@ -31,12 +31,16 @@ require_once( dirname( __FILE__ ) . '/Maintenance.php' ); class AddWiki extends Maintenance { public function __construct() { + global $wgNoDBParam; + parent::__construct(); $this->mDescription = "Add a new wiki to the family. Wikimedia specific!"; $this->addArg( 'language', 'Language code of new site, e.g. en' ); $this->addArg( 'site', 'Type of site, e.g. wikipedia' ); $this->addArg( 'dbname', 'Name of database to create, e.g. enwiki' ); $this->addArg( 'domain', 'Domain name of the wiki, e.g. en.wikipedia.org' ); + + $wgNoDBParam = true; } public function getDbType() { @@ -44,9 +48,8 @@ class AddWiki extends Maintenance { } public function execute() { - global $IP, $wgDefaultExternalStore, $wgNoDBParam; + global $IP, $wgDefaultExternalStore; - $wgNoDBParam = true; $lang = $this->getArg( 0 ); $site = $this->getArg( 1 ); $dbName = $this->getArg( 2 ); -- 2.20.1