mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 18:03:39 +01:00
savegard the account_id against changes not triggered by the accounts-class, eg. via SyncML/xmlrpc
This commit is contained in:
parent
ecc09fc1a2
commit
7ae03372ab
@ -425,6 +425,12 @@ class bocontacts extends socontacts
|
||||
$contact['n_fn'] = $this->fullname($contact);
|
||||
if (isset($contact['org_name'])) $contact['n_fileas'] = $this->fileas($contact);
|
||||
}
|
||||
// savegard the account_id against changes not triggered by the accounts-class
|
||||
if (isset($contact['account_id']) && !$ignore_acl)
|
||||
{
|
||||
$account_id = $contact['account_id'];
|
||||
unset($contact['account_id']);
|
||||
}
|
||||
// we dont update the content-history, if we run inside setup (admin-account-creation)
|
||||
if(!($this->error = parent::save($contact)) && is_object($GLOBALS['egw']->contenthistory))
|
||||
{
|
||||
@ -435,6 +441,9 @@ class bocontacts extends socontacts
|
||||
$GLOBALS['egw']->accounts->cache_invalidate($contact['account_id']);
|
||||
}
|
||||
}
|
||||
// restoring the unset account_id
|
||||
if ($account_id) $contact['account_id'] = $acount_id;
|
||||
|
||||
return !$this->error;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user