Pass the uid of an updated object to the storage layer
This commit is contained in:
parent
88d6ce9500
commit
bafdb3bd63
1 changed files with 3 additions and 2 deletions
|
@ -567,8 +567,7 @@ class rcube_kolab_contacts extends rcube_addressbook
|
|||
if ($old = $this->storagefolder->get_object($this->_id2uid($id))) {
|
||||
$object = $this->_from_rcube_contact($save_data, $old);
|
||||
|
||||
$saved = $this->storagefolder->save($object, 'contact', $uid);
|
||||
if (!$saved) {
|
||||
if (!$this->storagefolder->save($object, 'contact', $old['uid'])) {
|
||||
raise_error(array(
|
||||
'code' => 600, 'type' => 'php',
|
||||
'file' => __FILE__, 'line' => __LINE__,
|
||||
|
@ -1062,6 +1061,8 @@ class rcube_kolab_contacts extends rcube_addressbook
|
|||
{
|
||||
if (!$contact['uid'] && $contact['ID'])
|
||||
$contact['uid'] = $this->_id2uid($contact['ID']);
|
||||
else if (!$contact['uid'] && $old['uid'])
|
||||
$contact['uid'] = $old['uid'];
|
||||
|
||||
$contact['email'] = array_filter($this->get_col_values('email', $contact, true));
|
||||
$contact['website'] = array_filter($this->get_col_values('website', $contact, true));
|
||||
|
|
Loading…
Add table
Reference in a new issue