|
|
|
|
@ -53,7 +53,6 @@ class OC_DB {
|
|
|
|
|
*/
|
|
|
|
|
static private $DOCTRINE=null;
|
|
|
|
|
|
|
|
|
|
static private $inTransaction=false;
|
|
|
|
|
static private $type=null;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -421,27 +420,18 @@ class OC_DB {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Start a transaction
|
|
|
|
|
* @return bool
|
|
|
|
|
*/
|
|
|
|
|
public static function beginTransaction() {
|
|
|
|
|
self::connect();
|
|
|
|
|
self::$connection->beginTransaction();
|
|
|
|
|
self::$inTransaction=true;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Commit the database changes done during a transaction that is in progress
|
|
|
|
|
* @return bool
|
|
|
|
|
*/
|
|
|
|
|
public static function commit() {
|
|
|
|
|
self::connect();
|
|
|
|
|
if(!self::$inTransaction) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
self::$connection->commit();
|
|
|
|
|
self::$inTransaction=false;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|