fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [7352] API: transactions during setup


From: Sigurd Nes
Subject: [Fmsystem-commits] [7352] API: transactions during setup
Date: Mon, 06 Jun 2011 19:16:20 +0000

Revision: 7352
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7352
Author:   sigurdne
Date:     2011-06-06 19:16:19 +0000 (Mon, 06 Jun 2011)
Log Message:
-----------
API: transactions during setup

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.setup_process.inc.php

Modified: trunk/phpgwapi/inc/class.setup_process.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.setup_process.inc.php      2011-06-06 11:11:52 UTC 
(rev 7351)
+++ trunk/phpgwapi/inc/class.setup_process.inc.php      2011-06-06 19:16:19 UTC 
(rev 7352)
@@ -29,6 +29,7 @@
                var $tables;
                var $updateincluded = array();
                var $translation;
+               protected $global_lock = false;
 
                function __construct()
                {
@@ -259,7 +260,15 @@
                        }
                        $GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
 
-                       
$GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+                       if ( 
$GLOBALS['phpgw_setup']->oProc->m_odb->get_transaction() )
+                       {
+                               $this->global_lock = true;
+                       }
+                       else
+                       {
+                               
$GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+                       }
+
                        if ( !is_array($setup_info) )
                        {
                                $setup_info = array();
@@ -330,7 +339,12 @@
                                }
                                if($DEBUG) { echo '<br>process->current(): 
Outgoing status: ' . $appname . ',status: '. $setup_info[$key]['status']; }
                        }
-                       
$GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit();
+
+                       if ( !$this->global_lock )
+                       {
+                               
$GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit();
+                       }
+
                        /* Done, return current status */
                        return ($setup_info);
                }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]