diff --git a/infolog/inc/class.vcalinfolog.inc.php b/infolog/inc/class.vcalinfolog.inc.php index 8b2dd6f5d8..1bd483b210 100644 --- a/infolog/inc/class.vcalinfolog.inc.php +++ b/infolog/inc/class.vcalinfolog.inc.php @@ -20,7 +20,7 @@ { $taskData = $this->read($_taskID); - _debug_array($taskData); + //_debug_array($taskData); $taskGUID = $GLOBALS['phpgw']->common->generate_uid('infolog_task',$_taskID); #print "
"; @@ -47,22 +47,9 @@ $vevent->setAttribute('UID',$taskGUID); $vevent->setAttribute('CLASS',(($taskData['info_access'] == 'public')?'PUBLIC':'PRIVATE')); $vevent->setAttribute('STATUS',(($taskData['info_status'] == 'completed')?'COMPLETED':'NEEDS-ACTION')); - switch($taskData['info_pri']) - { - case 'urgent': - $vevent->setAttribute('PRIORITY',1); - break; - case 'high': - $vevent->setAttribute('PRIORITY',2); - break; - case 'normal': - $vevent->setAttribute('PRIORITY',3); - break; - case 'low': - $vevent->setAttribute('PRIORITY',4); - break; - - } + // 3=urgent => 1, 2=high => 2, 1=normal => 3, 0=low => 4 + $vevent->setAttribute('PRIORITY',4-$taskData['info_priority']); + #$vevent->setAttribute('TRANSP','OPAQUE'); # status # ATTENDEE @@ -116,23 +103,14 @@ $taskData['info_startdate'] = $attributes['value']; break; case 'PRIORITY': - switch($attributes['value']) + // 1 => 3=urgent, 2 => 2=high, 3 => 1=normal, 4 => 0=low + if (1 <= $attributes['value'] && $attributes['value'] <= 4) { - case '1': - $taskData['info_pri'] = 'urgent'; - break; - case '2': - $taskData['info_pri'] = 'high'; - break; - case '3': - $taskData['info_pri'] = 'normal'; - break; - case '4': - $taskData['info_pri'] = 'low'; - break; - default: - $taskData['info_pri'] = 'low'; - break; + $taskData['info_priority'] = 4 - $attributes['value']; + } + else + { + $taskData['info_priority'] = 1; // default = normal } break; case 'STATUS':