From 4613f6eb8af008ffa28e5bb7281ff2309928d59a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 8 Oct 2011 12:46:56 +0000 Subject: [PATCH] even as EGroupware only displays the date, we can still store the full value, it only get truncated, when infolog get saved in webgui --- infolog/inc/class.infolog_ical.inc.php | 13 ++++--------- infolog/inc/class.infolog_so.inc.php | 3 +-- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/infolog/inc/class.infolog_ical.inc.php b/infolog/inc/class.infolog_ical.inc.php index 270efe8844..5934a6ca3e 100644 --- a/infolog/inc/class.infolog_ical.inc.php +++ b/infolog/inc/class.infolog_ical.inc.php @@ -621,10 +621,9 @@ class infolog_ical extends infolog_bo $attribute['value'] += $taskData['info_startdate']; // fall throught case 'DUE': - // eGroupWare uses date only - $parts = @getdate($attribute['value']); - $value = @mktime(0, 0, 0, $parts['mon'], $parts['mday'], $parts['year']); - $taskData['info_enddate'] = $value; + // even as EGroupware only displays the date, we can still store the full value + // unless infolog get's stored, it does NOT truncate the time + $taskData['info_enddate'] = $attribute['value']; break; case 'COMPLETED': @@ -657,12 +656,8 @@ class infolog_ical extends infolog_bo case 'STATUS': // check if we (still) have X-INFOLOG-STATUS set AND it would give an unchanged status (no change by the user) - foreach ($component->_attributes as $attr) - { - if ($attr['name'] == 'X-INFOLOG-STATUS') break; - } $taskData['info_status'] = $this->vtodo2status($attribute['value'], - $attr['name'] == 'X-INFOLOG-STATUS' ? $attr['value'] : null); + ($attr=$component->getAttribute('X-INFOLOG-STATUS')) ? $attr['value'] : null); break; case 'SUMMARY': diff --git a/infolog/inc/class.infolog_so.inc.php b/infolog/inc/class.infolog_so.inc.php index 59e6ed6ed3..6f9aee98f5 100644 --- a/infolog/inc/class.infolog_so.inc.php +++ b/infolog/inc/class.infolog_so.inc.php @@ -411,8 +411,7 @@ class infolog_so */ function get_status($ids) { - $this->db->select($this->info_table,'info_id,info_type,info_status,info_percent',array('info_id'=>$ids),__LINE__,__FILE__); - while (($info = $this->db->row(true))) + foreach($this->db->select($this->info_table,'info_id,info_type,info_status,info_percent',array('info_id'=>$ids),__LINE__,__FILE__) as $info) { switch ($info['info_type'].'-'.$info['info_status']) {