[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11071] abort on debug
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11071] abort on debug |
Date: |
Tue, 23 Apr 2013 20:09:48 +0000 |
Revision: 11071
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11071
Author: sigurdne
Date: 2013-04-23 20:09:47 +0000 (Tue, 23 Apr 2013)
Log Message:
-----------
abort on debug
Modified Paths:
--------------
trunk/property/inc/class.uiimport.inc.php
Modified: trunk/property/inc/class.uiimport.inc.php
===================================================================
--- trunk/property/inc/class.uiimport.inc.php 2013-04-23 12:47:38 UTC (rev
11070)
+++ trunk/property/inc/class.uiimport.inc.php 2013-04-23 20:09:47 UTC (rev
11071)
@@ -25,6 +25,7 @@
protected $steps = 0;
protected $fields = array();
protected $table;
+ protected $debug;
// Label on the import button. Changes as we step through the
import process.
protected $import_button_label;
@@ -96,7 +97,8 @@
}
$this->import_conversion = new
import_conversion;
- $this->import_conversion->debug =
phpgw::get_var('debug', 'bool');
+ $this->debug = phpgw::get_var('debug', 'bool');
+ $this->import_conversion->debug = $this->debug;
// Get the path for user input or use a default
path
@@ -344,7 +346,15 @@
if($ok)
{
$this->messages[] = "Imported data. (" .
(time() - $start_time) . " seconds)";
- $this->db->transaction_commit();
+ if($this->debug)
+ {
+ $this->db->transaction_abort();
+ $this->messages[] = "Dry Run:
transaction abortet";
+ }
+ else
+ {
+ $this->db->transaction_commit();
+ }
return true;
}
else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11071] abort on debug,
Sigurd Nes <=