mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 01:43:47 +01:00
cat_id now just the number for a single entry, multiple entrys are separated as well as surounded by ','
empty stay empty
This commit is contained in:
parent
e58696276e
commit
e10d2f4650
@ -196,12 +196,14 @@
|
||||
$fields['access'] = 'public';
|
||||
}
|
||||
|
||||
if ($fields['cat_id'])
|
||||
if (is_array($cat_id))
|
||||
{
|
||||
$fields['cat_id'] = is_array($cat_id) ? implode(',',$cat_id) : $cat_id;
|
||||
// make sure commas surround each value
|
||||
$fields['cat_id'] = ',' . $fields['cat_id'] . ',';
|
||||
$fields['cat_id'] = count($cat_id) > 1 ? ','.implode(',',$cat_id).',' : $cat_id[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
$fields['cat_id'] = $cat_id;
|
||||
}
|
||||
|
||||
addressbook_add_entry($phpgw_info['user']['account_id'],$fields,$fields['access'],$fields['cat_id']);
|
||||
$ab_id = addressbook_get_lastid();
|
||||
|
@ -204,12 +204,14 @@
|
||||
$fields['access'] = 'public';
|
||||
}
|
||||
|
||||
if ($fields['cat_id'])
|
||||
if (is_array($cat_id))
|
||||
{
|
||||
$fields['cat_id'] = is_array($cat_id) ? implode(',',$cat_id) : $cat_id;
|
||||
// make sure commas surround each value
|
||||
$fields['cat_id'] = ',' . $fields['cat_id'] . ',';
|
||||
$fields['cat_id'] = count($cat_id) > 1 ? ','.implode(',',$cat_id).',' : $cat_id[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
$fields['cat_id'] = $cat_id;
|
||||
}
|
||||
|
||||
if (($this->grants[$check[0]['owner']] & PHPGW_ACL_EDIT) && $check[0]['owner'] != $phpgw_info['user']['account_id'])
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user