Fix task priorities for Funambol WM Client

This commit is contained in:
Jörg Lehrke 2010-01-09 22:28:41 +00:00
parent 3242e169cc
commit 70aee0a67d
2 changed files with 15 additions and 10 deletions

View File

@ -495,8 +495,9 @@ class calendar_ical extends calendar_boupdate
break; break;
case 'PRIORITY': case 'PRIORITY':
if($this->productManufacturer == 'funambol' && if ($this->productManufacturer == 'funambol' &&
strpos($this->productName, 'outlook') !== false) (strpos($this->productName, 'outlook') !== false
|| strpos($this->productName, 'pocket pc') !== false))
{ {
$attributes['PRIORITY'] = (int) $this->priority_egw2funambol[$event['priority']]; $attributes['PRIORITY'] = (int) $this->priority_egw2funambol[$event['priority']];
} }
@ -1933,8 +1934,9 @@ class calendar_ical extends calendar_boupdate
} }
break; break;
case 'PRIORITY': case 'PRIORITY':
if($this->productManufacturer == 'funambol' && if ($this->productManufacturer == 'funambol' &&
strpos($this->productName, 'outlook') !== false) (strpos($this->productName, 'outlook') !== false
|| strpos($this->productName, 'pocket pc') !== false))
{ {
$vcardData['priority'] = (int) $this->priority_funambol2egw[$attributes['value']]; $vcardData['priority'] = (int) $this->priority_funambol2egw[$attributes['value']];
} }

View File

@ -260,8 +260,9 @@ class infolog_ical extends infolog_bo
// we try to preserv the original infolog status as X-INFOLOG-STATUS, so we can restore it, if the user does not modify STATUS // we try to preserv the original infolog status as X-INFOLOG-STATUS, so we can restore it, if the user does not modify STATUS
$vevent->setAttribute('X-INFOLOG-STATUS',$taskData['info_status']); $vevent->setAttribute('X-INFOLOG-STATUS',$taskData['info_status']);
$vevent->setAttribute('PERCENT-COMPLETE',$taskData['info_percent']); $vevent->setAttribute('PERCENT-COMPLETE',$taskData['info_percent']);
if($this->productManufacturer == 'funambol' && if ($this->productManufacturer == 'funambol' &&
strpos($this->productName, 'outlook') !== false) (strpos($this->productName, 'outlook') !== false
|| strpos($this->productName, 'pocket pc') !== false))
{ {
$priority = (int) $this->priority_egw2funambol[$taskData['info_priority']]; $priority = (int) $this->priority_egw2funambol[$taskData['info_priority']];
} }
@ -426,7 +427,8 @@ class infolog_ical extends infolog_bo
foreach ($component->_attributes as $attributes) foreach ($component->_attributes as $attributes)
{ {
//$attributes['value'] = trim($attributes['value']); //$attributes['value'] = trim($attributes['value']);
if (empty($attributes['value'])) continue; if (!strlen($attributes['value'])) continue;
switch ($attributes['name']) switch ($attributes['name'])
{ {
case 'CLASS': case 'CLASS':
@ -476,9 +478,10 @@ class infolog_ical extends infolog_bo
break; break;
case 'PRIORITY': case 'PRIORITY':
if (1 <= $attributes['value'] && $attributes['value'] <= 9) { if (0 <= $attributes['value'] && $attributes['value'] <= 9) {
if($this->productManufacturer == 'funambol' && if ($this->productManufacturer == 'funambol' &&
strpos($this->productName, 'outlook') !== false) (strpos($this->productName, 'outlook') !== false
|| strpos($this->productName, 'pocket pc') !== false))
{ {
$taskData['info_priority'] = (int) $this->priority_funambol2egw[$attributes['value']]; $taskData['info_priority'] = (int) $this->priority_funambol2egw[$attributes['value']];
} }