[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15522] add transaction
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15522] add transaction |
Date: |
Mon, 29 Aug 2016 08:48:48 +0000 (UTC) |
Revision: 15522
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15522
Author: sigurdne
Date: 2016-08-29 08:48:48 +0000 (Mon, 29 Aug 2016)
Log Message:
-----------
add transaction
Modified Paths:
--------------
trunk/booking/inc/class.socommon.inc.php
Modified: trunk/booking/inc/class.socommon.inc.php
===================================================================
--- trunk/booking/inc/class.socommon.inc.php 2016-08-28 17:57:43 UTC (rev
15521)
+++ trunk/booking/inc/class.socommon.inc.php 2016-08-29 08:48:48 UTC (rev
15522)
@@ -821,10 +821,24 @@
}
}
}
+ if ($this->db->get_transaction())
+ {
+ $this->global_lock = true;
+ }
+ else
+ {
+ $this->db->transaction_begin();
+ }
+
foreach ($update_queries as $update_query)
{
$this->db->query($update_query, __LINE__,
__FILE__);
}
+
+ if (!$this->global_lock)
+ {
+ $this->db->transaction_commit();
+ }
$receipt['id'] = $id;
$receipt['message'][] = array('msg' => lang('Entity %1
has been updated', $entry['id']));
return $receipt;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15522] add transaction,
sigurdne <=