[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11775] property: supertransaction for nested commits
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11775] property: supertransaction for nested commits |
Date: |
Mon, 03 Mar 2014 15:15:28 +0000 |
Revision: 11775
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11775
Author: sigurdne
Date: 2014-03-03 15:15:28 +0000 (Mon, 03 Mar 2014)
Log Message:
-----------
property: supertransaction for nested commits
Modified Paths:
--------------
trunk/property/inc/class.boinvoice.inc.php
trunk/property/inc/class.soXport.inc.php
trunk/property/inc/class.uiimport.inc.php
trunk/property/inc/import/default/cvs_import_fiktiv_faktura_nlsh
Modified: trunk/property/inc/class.boinvoice.inc.php
===================================================================
--- trunk/property/inc/class.boinvoice.inc.php 2014-03-03 14:19:38 UTC (rev
11774)
+++ trunk/property/inc/class.boinvoice.inc.php 2014-03-03 15:15:28 UTC (rev
11775)
@@ -39,6 +39,11 @@
public $sum_amount = 0;
public $results = 0;
public $allrows = false;
+ /**
+ *
+ * @var boolean In case of mass-import of fictious invoices
+ */
+ public $supertransaction = false;
function property_boinvoice($session=false)
{
@@ -508,6 +513,7 @@
$buffer = array();
$soXport = CreateObject('property.soXport');
+ $soXport->supertransaction = $this->supertransaction;
if($values['loc1']=$values['location']['loc1'])
{
$values['dima']=implode('',$values['location']);
Modified: trunk/property/inc/class.soXport.inc.php
===================================================================
--- trunk/property/inc/class.soXport.inc.php 2014-03-03 14:19:38 UTC (rev
11774)
+++ trunk/property/inc/class.soXport.inc.php 2014-03-03 15:15:28 UTC (rev
11775)
@@ -43,6 +43,7 @@
var $voucher_id;
protected $global_lock = false;
var $debug = false;
+ public $supertransaction = false;
function __construct()
{
@@ -725,7 +726,10 @@
$orders_affected = array();
$_dateformat = $this->db->date_format();
- $this->db->transaction_begin();
+ if(!$this->supertransaction)
+ {
+ $this->db->transaction_begin();
+ }
$this->add($values, $skip_update_voucher_id);
$this->voucher_id = $values[0]['bilagsnr'];
@@ -771,12 +775,12 @@
}
}
-
$this->update_actual_cost_from_archive($orders_affected);
- return $this->db->transaction_commit();
-
-
+ if(!$this->supertransaction)
+ {
+ return $this->db->transaction_commit();
+ }
}
Modified: trunk/property/inc/class.uiimport.inc.php
===================================================================
--- trunk/property/inc/class.uiimport.inc.php 2014-03-03 14:19:38 UTC (rev
11774)
+++ trunk/property/inc/class.uiimport.inc.php 2014-03-03 15:15:28 UTC (rev
11775)
@@ -139,7 +139,7 @@
{
if ( preg_match('/\.\./',
$this->conv_type) )
{
- break;
+ throw new
Exception("Not a valid file: {$this->conv_type}");
}
$file = PHPGW_SERVER_ROOT .
"/property/inc/import/{$GLOBALS['phpgw_info']['user']['domain']}/{$this->conv_type}";
Modified: trunk/property/inc/import/default/cvs_import_fiktiv_faktura_nlsh
===================================================================
--- trunk/property/inc/import/default/cvs_import_fiktiv_faktura_nlsh
2014-03-03 14:19:38 UTC (rev 11774)
+++ trunk/property/inc/import/default/cvs_import_fiktiv_faktura_nlsh
2014-03-03 15:15:28 UTC (rev 11775)
@@ -18,6 +18,7 @@
$this->db = & $GLOBALS['phpgw']->db;
$this->join = $this->db->join;
$this->boinvoice =
CreateObject('property.boinvoice');
+ $this->boinvoice->supertransaction = true;
$this->soinvoice =
CreateObject('property.soinvoice');
$this->boworkorder =
CreateObject('property.boworkorder');
$this->soproject =
CreateObject('property.soproject');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11775] property: supertransaction for nested commits,
Sigurd Nes <=