mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
patch from christian binder
35-45: set vars for mapping prioritys from and to handheld 82: set PRIORITY attribute on export 173-181: handle PRIORITY field on import
This commit is contained in:
parent
9fa275421b
commit
0904b6e846
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user