Skip to content
Snippets Groups Projects
Commit c4864b4a authored by Robin Appelman's avatar Robin Appelman
Browse files

don't use PDO::inTransaction

parent 25f1263c
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@ class OC_DB {
static private $schema=false;
static private $affected=0;
static private $result=false;
static private $inTransaction=false;
/**
* @brief connects to the database
......@@ -490,17 +491,19 @@ class OC_DB {
return false;
}
self::$connection->beginTransaction();
self::$inTransaction=true;
}
/**
* Commit the database changes done during a transaction that is in progress
*/
public static function commit($savePoint=''){
public static function commit(){
self::connect();
if(!self::$connection->inTransaction()){
if(!self::$inTransaction){
return false;
}
self::$connection->commit();
self::$inTransaction=false;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment