Index: trunk/phase3/includes/BagOStuff.php |
— | — | @@ -240,14 +240,12 @@ |
241 | 241 | var $lastExpireAll = 0; |
242 | 242 | |
243 | 243 | protected function getDB() { |
244 | | - global $wgDBtype; |
245 | | - |
246 | 244 | if ( !isset( $this->db ) ) { |
247 | 245 | /* We must keep a separate connection to MySQL in order to avoid deadlocks |
248 | 246 | * However, SQLite has an opposite behaviour. |
249 | 247 | * @todo Investigate behaviour for other databases |
250 | 248 | */ |
251 | | - if ( $wgDBtype == 'sqlite' ) { |
| 249 | + if ( wfGetDB( DB_MASTER )->getType() == 'sqlite' ) { |
252 | 250 | $this->db = wfGetDB( DB_MASTER ); |
253 | 251 | } else { |
254 | 252 | $this->lb = wfGetLBFactory()->newMainLB(); |