[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11581] property: fix history entries
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11581] property: fix history entries |
Date: |
Thu, 02 Jan 2014 08:47:17 +0000 |
Revision: 11581
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11581
Author: sigurdne
Date: 2014-01-02 08:47:17 +0000 (Thu, 02 Jan 2014)
Log Message:
-----------
property: fix history entries
Modified Paths:
--------------
trunk/property/inc/class.botts.inc.php
trunk/property/inc/class.historylog.inc.php
Modified: trunk/property/inc/class.botts.inc.php
===================================================================
--- trunk/property/inc/class.botts.inc.php 2014-01-01 17:59:48 UTC (rev
11580)
+++ trunk/property/inc/class.botts.inc.php 2014-01-02 08:47:17 UTC (rev
11581)
@@ -843,13 +843,21 @@
if ((int)$value['new_value']>0)
{
$record_history[$i]['value_new_value'] =
$GLOBALS['phpgw']->accounts->id2name($value['new_value']);
+ }
+ else
+ {
+
$record_history[$i]['value_new_value'] = lang('None');
+ }
+
+ if ((int)$value['old_value']>0)
+ {
$record_history[$i]['value_old_value'] = $value['old_value'] ?
$GLOBALS['phpgw']->accounts->id2name($value['old_value']) : '';
}
else
{
-
$record_history[$i]['value_new_value'] = lang('None');
$record_history[$i]['value_old_value'] = lang('None');
}
+
}
else if ($value['status'] == 'T')
{
Modified: trunk/property/inc/class.historylog.inc.php
===================================================================
--- trunk/property/inc/class.historylog.inc.php 2014-01-01 17:59:48 UTC (rev
11580)
+++ trunk/property/inc/class.historylog.inc.php 2014-01-02 08:47:17 UTC (rev
11581)
@@ -143,12 +143,12 @@
$value_set = array
(
'history_record_id' => $record_id,
- 'history_appname' =>
$this->appname,
- 'history_owner' =>
$this->account,
- 'history_status' => $status,
- 'history_new_value' =>
$this->db->db_addslashes($new_value),
- 'history_old_value' =>
$this->db->db_addslashes($old_value),
- 'history_timestamp' => $timestamp
+ 'history_appname' =>
"'{$this->appname}'",
+ 'history_owner' =>
(int)$this->account,
+ 'history_status' =>
"'{$status}'",
+ 'history_new_value' => "'" .
$this->db->db_addslashes($new_value) . "'",
+ 'history_old_value' => "'" .
$this->db->db_addslashes($old_value) . "'",
+ 'history_timestamp' => "'" .
$timestamp."'",
);
if($this->attrib_id_field && $attrib_id)
@@ -161,7 +161,7 @@
}
$cols = implode(',', array_keys($value_set));
- $values =
$this->db->validate_insert(array_values($value_set));
+ $values = implode(',', array_values($value_set));
$sql = "INSERT INTO {$this->table} ({$cols}) VALUES
({$values})";
$this->db->query($sql,__LINE__,__FILE__);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11581] property: fix history entries,
Sigurd Nes <=