GetFolderList must always return an array to not break sync

This commit is contained in:
Philip Herbert 2011-03-20 18:08:44 +00:00
parent 38ef2706e3
commit ca11300994
2 changed files with 4 additions and 2 deletions

View File

@ -165,6 +165,7 @@ class addressbook_activesync implements activesync_plugin_write, activesync_plug
public function GetFolderList()
{
// error_log(print_r($this->addressbook->get_addressbooks(EGW_ACL_READ),true));
$folderlist = array();
foreach ($this->get_addressbooks() as $account => $label)
{
$folderlist[] = array(
@ -327,7 +328,7 @@ class addressbook_activesync implements activesync_plugin_write, activesync_plug
debugLog("airsyncbasebody!");
$message->airsyncbasebody = new SyncAirSyncBaseBody();
$message->airsyncbasenativebodytype=1;
$this->backend->note2messagenote($contact[$attr], $bodypreference, &$message->airsyncbasebody);
$this->backend->note2messagenote($contact[$attr], $bodypreference, $message->airsyncbasebody);
}
break;

View File

@ -75,6 +75,7 @@ class calendar_activesync implements activesync_plugin_write
$cals = $GLOBALS['egw_info']['user']['preferences']['activesync']['calendar-cals'];
$cals = $cals ? explode(',',$cals) : array('P'); // implicit default of 'P'
$folderlist = array();
foreach ($this->calendar->list_cals() as $label => $entry)
{
@ -625,7 +626,7 @@ class calendar_activesync implements activesync_plugin_write
debugLog("airsyncbasebody!");
$message->airsyncbasebody = new SyncAirSyncBaseBody();
$message->airsyncbasenativebodytype=1;
$this->backend->note2messagenote($event['description'], $bodypreference, &$message->airsyncbasebody);
$this->backend->note2messagenote($event['description'], $bodypreference, $message->airsyncbasebody);
}
$message->organizername = $GLOBALS['egw']->accounts->id2name($event['owner'],'account_fullname');