]> source.dussan.org Git - nextcloud-server.git/commitdiff
Simplify OC_DB transaction functions
authorBart Visscher <bartv@thisnet.nl>
Mon, 25 Feb 2013 21:59:06 +0000 (22:59 +0100)
committerBart Visscher <bartv@thisnet.nl>
Fri, 2 Aug 2013 14:12:34 +0000 (16:12 +0200)
lib/db.php

index dd48c3294907cd3ddcbaa2f1ae11381778b4438e..311cdcfecf596f9ac76facebe92874c733cf384f 100644 (file)
@@ -56,7 +56,6 @@ class OC_DB {
         */
        static private $DOCTRINE=null;
 
-       static private $inTransaction=false;
        static private $prefix=null;
        static private $type=null;
 
@@ -624,27 +623,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;
        }
 
        /**