From: Chad Horohoe Date: Fri, 10 Dec 2010 14:04:00 +0000 (+0000) Subject: One more $wgDBtype. I think this is the last offender in core; all the remaining... X-Git-Tag: 1.31.0-rc.0~33395 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=7c577f96ecf173bd17b3f2ef37a763bb938830ec;p=lhc%2Fweb%2Fwiklou.git One more $wgDBtype. I think this is the last offender in core; all the remaining usages are justified --- diff --git a/includes/BagOStuff.php b/includes/BagOStuff.php index d5f49e236c..70a87a7789 100644 --- a/includes/BagOStuff.php +++ b/includes/BagOStuff.php @@ -240,14 +240,12 @@ class SqlBagOStuff extends BagOStuff { var $lastExpireAll = 0; protected function getDB() { - global $wgDBtype; - if ( !isset( $this->db ) ) { /* We must keep a separate connection to MySQL in order to avoid deadlocks * However, SQLite has an opposite behaviour. * @todo Investigate behaviour for other databases */ - if ( $wgDBtype == 'sqlite' ) { + if ( wfGetDB( DB_MASTER )->getType() == 'sqlite' ) { $this->db = wfGetDB( DB_MASTER ); } else { $this->lb = wfGetLBFactory()->newMainLB();