From f4f5f41194ec3e417755579b392a4c09faf3db53 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 6 Nov 2014 11:38:22 -0800 Subject: [PATCH] Allow the empty string as the wiki DB * This is useful when cluster= is set but the DB is not there yet Change-Id: I1766c564448502c7359c7da964f0becd2e3222c6 --- maintenance/sql.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maintenance/sql.php b/maintenance/sql.php index afa3ef725c..886e3f108d 100644 --- a/maintenance/sql.php +++ b/maintenance/sql.php @@ -39,7 +39,8 @@ class MwSql extends Maintenance { } public function execute() { - $wiki = $this->getOption( 'wikidb' ) ?: false; + // We wan't to allow "" for the wikidb, meaning don't call select_db() + $wiki = $this->hasOption( 'wikidb' ) ? $this->getOption( 'wikidb' ) : false; // Get the appropriate load balancer (for this wiki) if ( $this->hasOption( 'cluster' ) ) { $lb = wfGetLBFactory()->getExternalLB( $this->getOption( 'cluster' ), $wiki ); -- 2.20.1