[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11583] property: fix history entries
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11583] property: fix history entries |
Date: |
Thu, 02 Jan 2014 12:14:26 +0000 |
Revision: 11583
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11583
Author: sigurdne
Date: 2014-01-02 12:14:24 +0000 (Thu, 02 Jan 2014)
Log Message:
-----------
property: fix history entries
Modified Paths:
--------------
trunk/property/inc/class.historylog.inc.php
trunk/property/inc/class.soentity.inc.php
Modified: trunk/property/inc/class.historylog.inc.php
===================================================================
--- trunk/property/inc/class.historylog.inc.php 2014-01-02 08:48:52 UTC (rev
11582)
+++ trunk/property/inc/class.historylog.inc.php 2014-01-02 12:14:24 UTC (rev
11583)
@@ -92,12 +92,12 @@
case 'entity':
case 'catch':
$this->table ="fm_{$selector}_history";
- $this->attrib_id_field =
',history_attrib_id';
+ $this->attrib_id_field =
'history_attrib_id';
break;
case 's_agreement':
$this->table='fm_s_agreement_history';
- $this->attrib_id_field =
',history_attrib_id';
- $this->detail_id_field =
',history_detail_id';
+ $this->attrib_id_field =
'history_attrib_id';
+ $this->detail_id_field =
'history_detail_id';
break;
case 'tenant_claim':
$this->table='fm_tenant_claim_history';
@@ -153,11 +153,11 @@
if($this->attrib_id_field && $attrib_id)
{
- $value_set[$this->attrib_id_field] =
$attrib_id;
+ $value_set[$this->attrib_id_field] =
(int)$attrib_id;
}
if($this->detail_id_field && $detail_id)
{
- $value_set[$this->detail_id_field] =
$detail_id;
+ $value_set[$this->detail_id_field] =
(int)$detail_id;
}
$cols = implode(',', array_keys($value_set));
Modified: trunk/property/inc/class.soentity.inc.php
===================================================================
--- trunk/property/inc/class.soentity.inc.php 2014-01-02 08:48:52 UTC (rev
11582)
+++ trunk/property/inc/class.soentity.inc.php 2014-01-02 12:14:24 UTC (rev
11583)
@@ -2006,6 +2006,19 @@
phpgw::import_class('phpgwapi.xmlhelper');
+/*
+ // FIXME: not working
+ if($data)
+ {
+ foreach ($data as $key => &$value)
+ {
+ if(preg_match('/[<>&]/', $value)) // or
use CDATA..
+ {
+ $value = str_ireplace (
array('<','>','<','>') , array('[',']', '[', ']') , $value);
+ }
+ }
+ }
+*/
$xmldata = phpgwapi_xmlhelper::toXML($data,
$location_name);
$doc = new DOMDocument;
$doc->preserveWhiteSpace = true;
@@ -2100,7 +2113,7 @@
$category =
$admin_entity->read_single_category($entity_id, $cat_id);
$location_id =
$GLOBALS['phpgw']->locations->get_id($this->type_app[$this->type],
".{$this->type}.{$entity_id}.{$cat_id}");
- if (isset($values_attribute) AND
is_array($values_attribute))
+ if (isset($values_attribute) &&
is_array($values_attribute))
{
foreach($values_attribute as $entry)
{
@@ -2154,7 +2167,7 @@
if($entry['datatype'] == 'D')
{
- $old_value =
date(phpgwapi_db::date_format(), strtotime($old_value));
+ $old_value = $old_value
? date(phpgwapi_db::date_format(), strtotime($old_value)) : '';
}
if($entry['value'] !=
$old_value)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11583] property: fix history entries,
Sigurd Nes <=