"- allways display addressbook contact is imported to

- dont move accounts to default addressbook"
This commit is contained in:
Ralf Becker 2009-07-10 12:39:00 +00:00
parent 25dc87e835
commit abbe9915fa

View File

@ -295,10 +295,14 @@ switch($_POST['action'])
$log = '<table border="1" style="border: 1px dotted black; border-collapse: collapse;">'."\n\t<tr><td>#</td>\n";
if (!in_array('id',$addr_fields)) // autocreate public access if not set by user
if (!in_array('id',$addr_fields)) // allways show ID
{
$log .= "\t\t<td><b>ID</b></td>\n";
}
if (!in_array('owner',$addr_fields)) // allways show addressbook
{
$log .= "\t\t<td><b>".lang('Addressbook')."</b></td>\n";
}
if (!in_array('private',$addr_fields)) // autocreate public access if not set by user
{
$log .= "\t\t<td><b>private</b></td>\n";
@ -452,7 +456,7 @@ switch($_POST['action'])
$values[$user] = $GLOBALS['egw']->accounts->name2id($values[$user],'account_lid',$user=='owner'?null:'u');
}
}
if (!isset($values['owner']) || isset($values['owner']) && !$values['owner'])
if (!isset($values['owner']) || isset($values['owner']) && (string)$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']))
@ -464,6 +468,10 @@ switch($_POST['action'])
{
$log .= "\t\t<td>".$values['id']."</td>\n";
}
if (!in_array('owner',$addr_fields))
{
$log .= "\t\t<td>".$values['owner']."</td>\n";
}
if (!in_array('private',$addr_fields))
{
$values['private'] = 0; // public access if not set by user