mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 11:23:54 +01:00
Fix SyncML addressbook handling
This commit is contained in:
parent
de8e93cfe9
commit
66e60ff200
@ -247,22 +247,6 @@ class addressbook_sif extends addressbook_bo
|
|||||||
{
|
{
|
||||||
$contact['cat_id'] = implode(',',$this->find_or_add_categories($contact['cat_id'], -1));
|
$contact['cat_id'] = implode(',',$this->find_or_add_categories($contact['cat_id'], -1));
|
||||||
}
|
}
|
||||||
if (isset($GLOBALS['egw_info']['user']['preferences']['syncml']['filter_addressbook']))
|
|
||||||
{
|
|
||||||
$owner = $GLOBALS['egw_info']['user']['preferences']['syncml']['filter_addressbook'];
|
|
||||||
switch ($owner)
|
|
||||||
{
|
|
||||||
case 'G':
|
|
||||||
$contact['owner'] = $GLOBALS['egw_info']['user']['account_primary_group'];
|
|
||||||
break;
|
|
||||||
case 'P':
|
|
||||||
case 0:
|
|
||||||
$contact['owner'] = $this->user;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$contact['owner'] = (int)$owner;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return $this->save($contact);
|
return $this->save($contact);
|
||||||
}
|
}
|
||||||
|
@ -175,23 +175,6 @@ class addressbook_vcal extends addressbook_bo
|
|||||||
{
|
{
|
||||||
$contact['cat_id'] = implode(',',$this->find_or_add_categories($contact['cat_id'], -1));
|
$contact['cat_id'] = implode(',',$this->find_or_add_categories($contact['cat_id'], -1));
|
||||||
}
|
}
|
||||||
if (isset($GLOBALS['egw_info']['user']['preferences']['syncml']['filter_addressbook']))
|
|
||||||
{
|
|
||||||
$owner = $GLOBALS['egw_info']['user']['preferences']['syncml']['filter_addressbook'];
|
|
||||||
switch ($owner)
|
|
||||||
{
|
|
||||||
case 'G':
|
|
||||||
$contact['owner'] = $GLOBALS['egw_info']['user']['account_primary_group'];
|
|
||||||
break;
|
|
||||||
case 'P':
|
|
||||||
case 'N':
|
|
||||||
case 0:
|
|
||||||
$contact['owner'] = $this->user;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$contact['owner'] = (int)$owner;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (isset($contact['owner']) && $contact['owner'] != $this->user)
|
if (isset($contact['owner']) && $contact['owner'] != $this->user)
|
||||||
{
|
{
|
||||||
@ -612,11 +595,13 @@ class addressbook_vcal extends addressbook_bo
|
|||||||
foreach($vcardValues as $key => $vcardRow)
|
foreach($vcardValues as $key => $vcardRow)
|
||||||
{
|
{
|
||||||
$rowName = strtoupper($vcardRow['name']);
|
$rowName = strtoupper($vcardRow['name']);
|
||||||
|
/*
|
||||||
if ($vcardRow['value'] == '' && implode('', $vcardRow['values']) == '')
|
if ($vcardRow['value'] == '' && implode('', $vcardRow['values']) == '')
|
||||||
{
|
{
|
||||||
unset($vcardRow);
|
unset($vcardRow);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
$rowTypes = array();
|
$rowTypes = array();
|
||||||
|
|
||||||
$vcardRow['uparams'] = array();
|
$vcardRow['uparams'] = array();
|
||||||
@ -626,7 +611,6 @@ class addressbook_vcal extends addressbook_bo
|
|||||||
$vcardRow['uparams'][$pname] = $params;
|
$vcardRow['uparams'][$pname] = $params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// expand 3.0 TYPE paramters to 2.1 qualifiers
|
// expand 3.0 TYPE paramters to 2.1 qualifiers
|
||||||
$vcardRow['tparams'] = array();
|
$vcardRow['tparams'] = array();
|
||||||
foreach ($vcardRow['uparams'] as $pname => $params)
|
foreach ($vcardRow['uparams'] as $pname => $params)
|
||||||
|
Loading…
Reference in New Issue
Block a user