even as EGroupware only displays the date, we can still store the full value, it only get truncated, when infolog get saved in webgui

This commit is contained in:
Ralf Becker 2011-10-08 12:46:56 +00:00
parent b2fa12eb3e
commit 4613f6eb8a
2 changed files with 5 additions and 11 deletions

View File

@ -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':

View File

@ -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'])
{