diff --git a/infolog/inc/class.vcalinfolog.inc.php b/infolog/inc/class.vcalinfolog.inc.php index 5a4c8b23d9..a8b9bc5d2c 100644 --- a/infolog/inc/class.vcalinfolog.inc.php +++ b/infolog/inc/class.vcalinfolog.inc.php @@ -34,6 +34,20 @@ 'CANCELLED' => 'cancelled', ); + var $egw_priority2vcal_priority = array( + 0 => 3, + 1 => 2, + 2 => 1, + 3 => 1, + + ); + + var $vcal_priority2egw_priority = array( + 1 => 2, + 2 => 1, + 3 => 0, + ); + function exportVTODO($_taskID, $_version) { $taskData = $this->read($_taskID); @@ -71,8 +85,7 @@ $vevent->setAttribute('CLASS',$taskData['info_access'] == 'public' ? 'PUBLIC' : 'PRIVATE'); $vevent->setAttribute('STATUS',isset($this->status2vtodo[$taskData['info_status']]) ? $this->status2vtodo[$taskData['info_status']] : 'NEEDS-ACTION'); - // 3=urgent => 1, 2=high => 2, 1=normal => 3, 0=low => 4 - $vevent->setAttribute('PRIORITY',4-$taskData['info_priority']); + $vevent->setAttribute('PRIORITY',$this->egw_priority2vcal_priority[$taskData['info_priority']]); #$vevent->setAttribute('TRANSP','OPAQUE'); # status @@ -168,10 +181,9 @@ $taskData['info_startdate'] = $attributes['value']; break; case 'PRIORITY': - // 1 => 3=urgent, 2 => 2=high, 3 => 1=normal, 4 => 0=low - if (1 <= $attributes['value'] && $attributes['value'] <= 4) + if (1 <= $attributes['value'] && $attributes['value'] <= 3) { - $taskData['info_priority'] = 4 - $attributes['value']; + $taskData['info_priority'] = $this->vcal_priority2egw_priority[$attributes['value']]; } else {