[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.boentity.inc.php class.soent...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/inc class.boentity.inc.php class.soent... |
Date: |
Mon, 06 Feb 2006 10:28:36 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Branch:
Changes by: Sigurd Nes <address@hidden> 06/02/06 10:28:36
Modified files:
inc : class.boentity.inc.php class.soentity.inc.php
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.boentity.inc.php.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.soentity.inc.php.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
Patches:
Index: property/inc/class.boentity.inc.php
diff -u property/inc/class.boentity.inc.php:1.16
property/inc/class.boentity.inc.php:1.17
--- property/inc/class.boentity.inc.php:1.16 Sun Feb 5 20:07:35 2006
+++ property/inc/class.boentity.inc.php Mon Feb 6 10:28:36 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage entity
- * @version $Id: class.boentity.inc.php,v 1.16 2006/02/05 20:07:35
sigurdne Exp $
+ * @version $Id: class.boentity.inc.php,v 1.17 2006/02/06 10:28:36
sigurdne Exp $
*/
/**
@@ -540,6 +540,8 @@
$values['date'] =
$this->bocommon->date_to_timestamp($values['date']);
+ if (is_array($values_attribute))
+ {
for ($i=0;$i<count($values_attribute);$i++)
{
if($values_attribute[$i]['datatype']=='CH' &&
$values_attribute[$i]['value'])
@@ -562,6 +564,7 @@
$values_attribute[$i]['value'] =
date($this->bocommon->dateformat,$this->bocommon->date_to_timestamp($values_attribute[$i]['value']));
}
}
+ }
if ($action=='edit')
{
Index: property/inc/class.soentity.inc.php
diff -u property/inc/class.soentity.inc.php:1.14
property/inc/class.soentity.inc.php:1.15
--- property/inc/class.soentity.inc.php:1.14 Sun Feb 5 20:07:35 2006
+++ property/inc/class.soentity.inc.php Mon Feb 6 10:28:36 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage entity
- * @version $Id: class.soentity.inc.php,v 1.14 2006/02/05 20:07:35
sigurdne Exp $
+ * @version $Id: class.soentity.inc.php,v 1.15 2006/02/06 10:28:36
sigurdne Exp $
*/
/**
@@ -550,6 +550,11 @@
{
$cols[] = $entry['name'];
$vals[] = $entry['value'];
+
+ if($entry['history'] == 1)
+ {
+
$history_set[$entry['attrib_id']] = $entry['value'];
+ }
}
}
}
@@ -573,16 +578,28 @@
. time() . ","
. $this->account. " $vals)",__LINE__,__FILE__);
- if($values['origin'][0]['data'][0]['id'])
+ if (is_array($values['origin']))
+ {
+ if($values['origin'][0]['data'][0]['id'])
+ {
+ $this->db->query("INSERT INTO fm_origin
(origin,origin_id,destination,destination_id,user_id,entry_date) "
+ . "VALUES ('"
+ . $values['origin'][0]['type'].
"',"
+ .
$values['origin'][0]['data'][0]['id']. ","
+ . "'entity_" . $entity_id .'_'
. $cat_id . "',"
+ . $values['id']. ","
+ . $this->account. ","
+ . time() .
")",__LINE__,__FILE__);
+ }
+ }
+
+ if (isset($history_set) AND is_array($history_set))
{
- $this->db->query("INSERT INTO fm_origin
(origin,origin_id,destination,destination_id,user_id,entry_date) "
- . "VALUES ('"
- . $values['origin'][0]['type']. "',"
- .
$values['origin'][0]['data'][0]['id']. ","
- . "'entity_" . $entity_id .'_' .
$cat_id . "',"
- . $values['id']. ","
- . $this->account. ","
- . time() . ")",__LINE__,__FILE__);
+ $historylog =
CreateObject($this->currentapp.'.historylog','entity_' . $entity_id .'_' .
$cat_id);
+ while (list($attrib_id,$new_value) =
each($history_set))
+ {
+
$historylog->add('SO',$values['id'],$new_value,False, $attrib_id);
+ }
}
$this->db->transaction_commit();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.boentity.inc.php class.soent...,
Sigurd Nes <=