summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-02-09 19:51:24 +0100
committerRobin Appelman <icewind@owncloud.com>2012-02-09 19:53:02 +0100
commitc4864b4a54fb355f50da51d699a69b990610b146 (patch)
treefa1578fb93646dc452e5143e2dd185b60ad89d1a /lib
parent25f1263c11f5704b8e429262341416fbe7081f9a (diff)
downloadnextcloud-server-c4864b4a54fb355f50da51d699a69b990610b146.tar.gz
nextcloud-server-c4864b4a54fb355f50da51d699a69b990610b146.zip
don't use PDO::inTransaction
Diffstat (limited to 'lib')
-rw-r--r--lib/db.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/db.php b/lib/db.php
index 82d9b67dca8..9d3c20e0145 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -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;
}
}