mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
fix bug regarding changed owner id for private/own addressbook, as private addressbook holds a special id in activesync, resulting in failed sync of private addressbook entrys
This commit is contained in:
parent
a1df0766a7
commit
4a65e417c5
@ -496,6 +496,13 @@ class addressbook_activesync implements activesync_plugin_write, activesync_plug
|
||||
if (!isset($this->addressbook)) $this->addressbook = new addressbook_bo();
|
||||
|
||||
$this->backend->splitID($folderid, $type, $account);
|
||||
$is_private = false;
|
||||
if ($account == self::PRIVATE_AB)
|
||||
{
|
||||
$account = $GLOBALS['egw_info']['user']['account_id'];
|
||||
$is_private = true;
|
||||
|
||||
}
|
||||
// error_log(__METHOD__. " Id " .$id. " Account ". $account . " FolderID " . $folderid);
|
||||
if ($type != 'addressbook') // || !($contact = $this->addressbook->read($id)))
|
||||
{
|
||||
@ -579,6 +586,7 @@ class addressbook_activesync implements activesync_plugin_write, activesync_plug
|
||||
if (!$GLOBALS['egw_info']['user']['preferences']['activesync']['addressbook-all-in-one'])
|
||||
{
|
||||
$contact['owner'] = $account;
|
||||
$contact['private'] = $is_private;
|
||||
}
|
||||
if (!empty($id)) $contact['id'] = $id;
|
||||
$this->addressbook->fixup_contact($contact);
|
||||
@ -706,6 +714,10 @@ class addressbook_activesync implements activesync_plugin_write, activesync_plug
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($owner == self::PRIVATE_AB)
|
||||
{
|
||||
$owner = $GLOBALS['egw_info']['user']['account_id'];
|
||||
}
|
||||
$ctag = $this->addressbook->get_ctag($owner);
|
||||
|
||||
$changes = array(); // no change
|
||||
|
Loading…
Reference in New Issue
Block a user