mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-26 15:21:37 +01:00
if there is a personal addressbook (positive ID) selected as Default or forced; assume users own ID, as it is handled in addressbook settings (addressbook to add new contacts to)
This commit is contained in:
parent
ddb2ff2155
commit
da872fae0c
@ -238,13 +238,15 @@ class addressbook_sif extends addressbook_bo
|
|||||||
$contact['id'] = $_abID;
|
$contact['id'] = $_abID;
|
||||||
}
|
}
|
||||||
elseif (array_key_exists('filter_addressbook', $GLOBALS['egw_info']['user']['preferences']['syncml']))
|
elseif (array_key_exists('filter_addressbook', $GLOBALS['egw_info']['user']['preferences']['syncml']))
|
||||||
{
|
{
|
||||||
$contact['owner'] = (int) $GLOBALS['egw_info']['user']['preferences']['syncml']['filter_addressbook'];
|
$contact['owner'] = (int) $GLOBALS['egw_info']['user']['preferences']['syncml']['filter_addressbook'];
|
||||||
if ($contact['owner'] == -1)
|
if ($contact['owner'] == -1)
|
||||||
{
|
{
|
||||||
$contact['owner'] = $GLOBALS['egw_info']['user']['account_primary_group'];
|
$contact['owner'] = $GLOBALS['egw_info']['user']['account_primary_group'];
|
||||||
}
|
}
|
||||||
}
|
// if there is a positive id as filter it is to be interpreted as "Personal Addressbook"
|
||||||
|
if ($contact['owner'] > 0) $contact['owner'] = $GLOBALS['egw_info']['user']['account_id'];
|
||||||
|
}
|
||||||
return $this->save($contact);
|
return $this->save($contact);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,6 +166,8 @@ class addressbook_vcal extends addressbook_bo
|
|||||||
{
|
{
|
||||||
$contact['owner'] = $GLOBALS['egw_info']['user']['account_primary_group'];
|
$contact['owner'] = $GLOBALS['egw_info']['user']['account_primary_group'];
|
||||||
}
|
}
|
||||||
|
// if there is a positive id as filter it is to be interpreted as "Personal Addressbook"
|
||||||
|
if ($contact['owner'] > 0) $contact['owner'] = $GLOBALS['egw_info']['user']['account_id'];
|
||||||
if (is_array($contact['category']))
|
if (is_array($contact['category']))
|
||||||
{
|
{
|
||||||
$contact['category'] = implode(',',$this->find_or_add_categories($contact['category'], -1));
|
$contact['category'] = implode(',',$this->find_or_add_categories($contact['category'], -1));
|
||||||
@ -931,7 +933,14 @@ class addressbook_vcal extends addressbook_bo
|
|||||||
|
|
||||||
if (isset($GLOBALS['egw_info']['user']['preferences']['syncml']['filter_addressbook']))
|
if (isset($GLOBALS['egw_info']['user']['preferences']['syncml']['filter_addressbook']))
|
||||||
{
|
{
|
||||||
$contact['owner'] = $GLOBALS['egw_info']['user']['preferences']['syncml']['filter_addressbook'];
|
//$contact['owner'] = $GLOBALS['egw_info']['user']['preferences']['syncml']['filter_addressbook'];
|
||||||
|
$contact['owner'] = (int) $GLOBALS['egw_info']['user']['preferences']['syncml']['filter_addressbook'];
|
||||||
|
if ($contact['owner'] == -1)
|
||||||
|
{
|
||||||
|
$contact['owner'] = $GLOBALS['egw_info']['user']['account_primary_group'];
|
||||||
|
}
|
||||||
|
// if there is a positive id as filter it is to be interpreted as "Personal Addressbook"
|
||||||
|
if ($contact['owner'] > 0) $contact['owner'] = $GLOBALS['egw_info']['user']['account_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->fixup_contact($contact);
|
$this->fixup_contact($contact);
|
||||||
|
Loading…
Reference in New Issue
Block a user