/**
  * Set up LBFactory so that wfGetDB() etc. works.
  * We set up a special LBFactory instance which returns the current
  * installer connection.
  */
 public function enableLB()
 {
     $status = $this->getConnection();
     if (!$status->isOK()) {
         throw new MWException(__METHOD__ . ': unexpected DB connection error');
     }
     LBFactory::setInstance(new LBFactory_Single(array('connection' => $status->value)));
 }