From acd9ac77771ffb468c41e28271db43a24e55f452 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 20 Sep 2006 04:30:13 +0000 Subject: [PATCH] fixed error-message on save of new contact (id was not returned due to a recent change) --- addressbook/inc/class.bocontacts.inc.php | 1 + addressbook/inc/class.socontacts.inc.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addressbook/inc/class.bocontacts.inc.php b/addressbook/inc/class.bocontacts.inc.php index 903dda84df..7b5d4a890f 100755 --- a/addressbook/inc/class.bocontacts.inc.php +++ b/addressbook/inc/class.bocontacts.inc.php @@ -476,6 +476,7 @@ class bocontacts extends socontacts // we dont update the content-history, if we run inside setup (admin-account-creation) if(!($this->error = parent::save($to_write)) && is_object($GLOBALS['egw']->contenthistory)) { + $contact['id'] = $to_write['id']; $GLOBALS['egw']->contenthistory->updateTimeStamp('contacts', $contact['id'],$isUpdate ? 'modify' : 'add', time()); if ($contact['account_id']) // invalidate the cache of the accounts class diff --git a/addressbook/inc/class.socontacts.inc.php b/addressbook/inc/class.socontacts.inc.php index 89edcb98ba..0cea365180 100755 --- a/addressbook/inc/class.socontacts.inc.php +++ b/addressbook/inc/class.socontacts.inc.php @@ -368,7 +368,7 @@ class socontacts * saves contact data including custiom felds * * @param array &$contact contact data from etemplate::exec - * @return bool false if all went wrong, errornumber on failure + * @return bool false on success, errornumber on failure */ function save(&$contact) { @@ -410,7 +410,7 @@ class socontacts } } if($error_nr) return $error_nr; - + // save customfields foreach ((array)$this->customfields as $field => $options) {