implemented/fixed read flag handling, enabled categories for addressbook, fixed typos

This commit is contained in:
Philip Herbert 2011-03-07 15:03:56 +00:00
parent ea989a2af8
commit b0b4c8bf6a
2 changed files with 38 additions and 5 deletions

View File

@ -336,11 +336,11 @@ class addressbook_activesync implements activesync_plugin_write, activesync_plug
break;
case 'cat_id':
/*$message->$key = array();
$message->$key = array();
foreach($contact[$attr] ? explode(',',$contact[$attr]) : array() as $cat_id)
{
$message->categories[] = categories::id2name($cat_id);
}*/
}
break;
default:
@ -503,6 +503,13 @@ class addressbook_activesync implements activesync_plugin_write, activesync_plug
$contact[$attr] = base64_decode($message->$key);
break;
case 'cat_id':
if (is_array($message->$key))
{
$contact[$attr] = implode(',', array_filter($this->addressbook->find_or_add_categories($message->$key, $id),'strlen'));
}
break;
default:
$contact[$attr] = $message->$key;
break;
@ -560,6 +567,19 @@ class addressbook_activesync implements activesync_plugin_write, activesync_plug
return $ret;
}
/**
* This should change the 'read' flag of a message on disk. The $flags
* parameter can only be '1' (read) or '0' (unread). After a call to
* SetReadFlag(), GetMessageList() should return the message with the
* new 'flags' but should not modify the 'mod' parameter. If you do
* change 'mod', simply setting the message to 'read' on the PDA will trigger
* a full resync of the item from the server
*/
function SetReadFlag($folderid, $id, $flags)
{
return false;
}
/**
* Return a changes array
*

View File

@ -274,7 +274,7 @@ class calendar_activesync implements activesync_plugin_write
if ($recur_date) // virtual exception
{
// @todo check if virtual exception needs to be saved as real exception, or only stati need to be changed
debutLog(__METHOD__."('$folderid',$id:$recur_date,".array2string($message).") handling of virtual exception not yet implemented!");
debugLog(__METHOD__."('$folderid',$id:$recur_date,".array2string($message).") handling of virtual exception not yet implemented!");
error_log(__METHOD__."('$folderid',$id:$recur_date,".array2string($message).") handling of virtual exception not yet implemented!");
}
if (!$this->calendar->check_perms($id ? EGW_ACL_EDIT : EGW_ACL_ADD,$event ? $event : 0,$account))
@ -535,6 +535,19 @@ class calendar_activesync implements activesync_plugin_write
return $ret;
}
/**
* This should change the 'read' flag of a message on disk. The $flags
* parameter can only be '1' (read) or '0' (unread). After a call to
* SetReadFlag(), GetMessageList() should return the message with the
* new 'flags' but should not modify the 'mod' parameter. If you do
* change 'mod', simply setting the message to 'read' on the PDA will trigger
* a full resync of the item from the server
*/
function SetReadFlag($folderid, $id, $flags)
{
return false;
}
/**
* Get specified item from specified folder.
*
@ -632,7 +645,7 @@ class calendar_activesync implements activesync_plugin_write
$message->attendees[] = $attendee;
}
$message->categories = array();
foreach($event['catgory'] ? explode(',',$event['category']) : array() as $cat_id)
foreach($event['category'] ? explode(',',$event['category']) : array() as $cat_id)
{
$message->categories[] = categories::id2name($cat_id);
}