Fix infolog category issue

This commit is contained in:
Jörg Lehrke 2009-12-07 09:00:58 +00:00
parent d6da8d8980
commit fda9c4f5f0
2 changed files with 14 additions and 3 deletions

View File

@ -669,6 +669,7 @@ class infolog_bo
$values['info_modifier'] = $this->so->user; $values['info_modifier'] = $this->so->user;
} }
//_debug_array($values); //_debug_array($values);
// error_log(__FILE__.'['.__LINE__.'] '.__METHOD__."()\n".array2string($values)."\n",3,'/tmp/infolog');
$to_write = $values; $to_write = $values;
if ($status_only && !$undelete) $values = array_merge($backup_values,$values); if ($status_only && !$undelete) $values = array_merge($backup_values,$values);
// convert user- to system-time // convert user- to system-time
@ -1099,7 +1100,7 @@ class infolog_bo
{ {
foreach($old_categories as $cat_id) foreach($old_categories as $cat_id)
{ {
if(!$this->categories->check_perms(EGW_ACL_READ, $cat_id)) if($cat_id && !$this->categories->check_perms(EGW_ACL_READ, $cat_id))
{ {
$old_cats_preserve[] = $cat_id; $old_cats_preserve[] = $cat_id;
} }

View File

@ -403,8 +403,18 @@ class infolog_ical extends infolog_bo
break; break;
case 'CATEGORIES': case 'CATEGORIES':
$cats = $this->find_or_add_categories(explode(',', $attributes['value']), $_taskID); if ($attributes['value'])
$taskData['info_cat'] = $cats[0]; {
if($version == '1.0')
{
$vcats = $this->find_or_add_categories(explode(';',$attributes['value']), $_taskID);
}
else
{
$cats = $this->find_or_add_categories(explode(',',$attributes['value']), $_taskID);
}
$taskData['info_cat'] = $cats[0];
}
break; break;
case 'UID': case 'UID':