r80837 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80836‎ | r80837 | r80838 >
Date:22:49, 23 January 2011
Author:platonides
Status:ok
Tags:
Comment:
$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
Modified paths:
  • /trunk/phase3/maintenance/addwiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/addwiki.php
@@ -31,12 +31,16 @@
3232
3333 class AddWiki extends Maintenance {
3434 public function __construct() {
 35+ global $wgNoDBParam;
 36+
3537 parent::__construct();
3638 $this->mDescription = "Add a new wiki to the family. Wikimedia specific!";
3739 $this->addArg( 'language', 'Language code of new site, e.g. en' );
3840 $this->addArg( 'site', 'Type of site, e.g. wikipedia' );
3941 $this->addArg( 'dbname', 'Name of database to create, e.g. enwiki' );
4042 $this->addArg( 'domain', 'Domain name of the wiki, e.g. en.wikipedia.org' );
 43+
 44+ $wgNoDBParam = true;
4145 }
4246
4347 public function getDbType() {
@@ -44,9 +48,8 @@
4549 }
4650
4751 public function execute() {
48 - global $IP, $wgDefaultExternalStore, $wgNoDBParam;
 52+ global $IP, $wgDefaultExternalStore;
4953
50 - $wgNoDBParam = true;
5154 $lang = $this->getArg( 0 );
5255 $site = $this->getArg( 1 );
5356 $dbName = $this->getArg( 2 );

Follow-up revisions

RevisionCommit summaryAuthorDate
r816981.17wmf1: MFT r80837, r81612, r81615, r81657, r81674, r81689catrope08:21, 8 February 2011

Status & tagging log