[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [12888] Add dry_run as proposed by Nelson
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [12888] Add dry_run as proposed by Nelson |
Date: |
Sun, 22 Mar 2015 15:18:55 +0000 |
Revision: 12888
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12888
Author: sigurdne
Date: 2015-03-22 15:18:54 +0000 (Sun, 22 Mar 2015)
Log Message:
-----------
Add dry_run as proposed by Nelson
Modified Paths:
--------------
branches/dev-syncromind/property/inc/class.bolocation.inc.php
branches/dev-syncromind/property/inc/class.solocation.inc.php
branches/dev-syncromind/property/inc/class.uilocation.inc.php
Modified: branches/dev-syncromind/property/inc/class.bolocation.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.bolocation.inc.php
2015-03-20 21:31:41 UTC (rev 12887)
+++ branches/dev-syncromind/property/inc/class.bolocation.inc.php
2015-03-22 15:18:54 UTC (rev 12888)
@@ -1000,9 +1000,9 @@
return $this->so->check_history($location_code);
}
- function get_history($location_code)
+ function get_history($location_code, $dry_run = false)
{
- $history = $this->so->get_history($location_code);
+ $history = $this->so->get_history($location_code,
$dry_run);
$this->uicols = $this->so->uicols;
return $history;
}
Modified: branches/dev-syncromind/property/inc/class.solocation.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.solocation.inc.php
2015-03-20 21:31:41 UTC (rev 12887)
+++ branches/dev-syncromind/property/inc/class.solocation.inc.php
2015-03-22 15:18:54 UTC (rev 12888)
@@ -1762,7 +1762,13 @@
}
}
- function get_history($location_code='')
+ /**
+ * Get complete copies of older versions of the record
+ * @param string $location_code
+ * @param bool $dry_run
+ * @return array $values
+ */
+ function get_history($location_code, $dry_run = false)
{
$this->uicols = array();
$location_array = explode('-',$location_code);
@@ -1803,6 +1809,10 @@
$this->uicols['name'][] = 'exp_date';
$this->uicols['descr'][] = lang('exp date');
+ if($dry_run)
+ {
+ return;
+ }
$attrib[] = array
(
Modified: branches/dev-syncromind/property/inc/class.uilocation.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uilocation.inc.php
2015-03-20 21:31:41 UTC (rev 12887)
+++ branches/dev-syncromind/property/inc/class.uilocation.inc.php
2015-03-22 15:18:54 UTC (rev 12888)
@@ -1987,7 +1987,7 @@
{
$tabs['history'] = array('label' =>
lang('history'), 'link' => '#history', 'function' => 'get_history_data()');
- $this->bo->get_history($location_code);
+ $this->bo->get_history($location_code,
true); //the second parameter is a 'dry_run' to only get headers.
$uicols = $this->bo->uicols;
$history_def = array();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [12888] Add dry_run as proposed by Nelson,
Sigurd Nes <=