"use default addressbook for new contacts (user preferences), if no owner specified"

This commit is contained in:
Ralf Becker 2009-07-09 12:38:50 +00:00
parent dc813fd741
commit 69d377b5d5

View File

@ -454,7 +454,11 @@ switch($_POST['action'])
}
if (!in_array('owner',$addr_fields) || !$values['owner'])
{
$values['owner'] = $GLOBALS['egw_info']['user']['account_id'];
// use default addressbook for new contacts (user preferences), if no owner specified
if(!($values['owner'] = $GLOBALS['egw_info']['user']['preferences']['addressbook']['add_default']))
{
$values['owner'] = $GLOBALS['egw_info']['user']['account_id'];
}
}
if (!in_array('id',$addr_fields))
{