* Fix transaction for upgrade.
This commit is contained in:
@@ -665,6 +665,17 @@ class dbh
|
||||
return $this->pdo->beginTransaction();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check in transaction or not.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function inTransaction()
|
||||
{
|
||||
return $this->pdo->inTransaction();
|
||||
}
|
||||
|
||||
/**
|
||||
* Roll back if transaction failed.
|
||||
*
|
||||
|
||||
@@ -167,7 +167,7 @@ class upgrade extends control
|
||||
if(!$this->upgrade->isError())
|
||||
{
|
||||
$this->loadModel('setting')->updateVersion($this->config->version);
|
||||
$this->dao->commit();
|
||||
if($this->dao->inTransaction()) $this->dao->commit();
|
||||
|
||||
$systemMode = $this->setting->getItem('owner=system&module=common§ion=global&key=mode');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user