Yaron Koren has submitted this change and it was merged. Change subject: Fix for when $wgCargoDBtype is not set ......................................................................
Fix for when $wgCargoDBtype is not set Change-Id: I665b1656d2d933a4e284675c0459e76bcde9e5b2 --- M CargoUtils.php 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/CargoUtils.php b/CargoUtils.php index 443561c..0c683aa 100644 --- a/CargoUtils.php +++ b/CargoUtils.php @@ -27,7 +27,10 @@ $name = $dbw->getDBname(); $type = $dbw->getType(); - $dbType = is_null( $wgCargoDBtype ) ? $type : $wgCargoDBtype; + // We need $wgCargoDBtype for other functions. + if ( is_null( $wgCargoDBtype ) ) { + $wgCargoDBtype = $type; + } $dbServer = is_null( $wgCargoDBserver ) ? $server : $wgCargoDBserver; $dbUsername = is_null( $wgCargoDBuser ) ? $wgDBuser : $wgCargoDBuser; $dbPassword = is_null( $wgCargoDBpassword ) ? $wgDBpassword : $wgCargoDBpassword; @@ -44,7 +47,7 @@ 'tablePrefix' => $dbTablePrefix, ]; - return Database::factory( $dbType, $params ); + return Database::factory( $wgCargoDBtype, $params ); } /** -- To view, visit https://gerrit.wikimedia.org/r/315958 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I665b1656d2d933a4e284675c0459e76bcde9e5b2 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren <yaro...@gmail.com> Gerrit-Reviewer: Yaron Koren <yaro...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits