jenkins-bot has submitted this change and it was merged.

Change subject: Allow the empty string as the wiki DB
......................................................................


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
---
M maintenance/sql.php
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/maintenance/sql.php b/maintenance/sql.php
index afa3ef7..886e3f1 100644
--- a/maintenance/sql.php
+++ b/maintenance/sql.php
@@ -39,7 +39,8 @@
        }
 
        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 );

-- 
To view, visit https://gerrit.wikimedia.org/r/171620
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1766c564448502c7359c7da964f0becd2e3222c6
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to