"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

@ -453,9 +453,13 @@ switch($_POST['action'])
}
}
if (!in_array('owner',$addr_fields) || !$values['owner'])
{
// 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))
{
$log .= "\t\t<td>".$values['id']."</td>\n";