fixed error-message on save of new contact (id was not returned due to a recent change)

This commit is contained in:
Ralf Becker 2006-09-20 04:30:13 +00:00
parent c0effaf429
commit acd9ac7777
2 changed files with 3 additions and 2 deletions

View File

@ -476,6 +476,7 @@ class bocontacts extends socontacts
// we dont update the content-history, if we run inside setup (admin-account-creation) // 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)) 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()); $GLOBALS['egw']->contenthistory->updateTimeStamp('contacts', $contact['id'],$isUpdate ? 'modify' : 'add', time());
if ($contact['account_id']) // invalidate the cache of the accounts class if ($contact['account_id']) // invalidate the cache of the accounts class

View File

@ -368,7 +368,7 @@ class socontacts
* saves contact data including custiom felds * saves contact data including custiom felds
* *
* @param array &$contact contact data from etemplate::exec * @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) function save(&$contact)
{ {