forked from extern/egroupware
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,11 +196,13 @@
|
|||||||
$fields['access'] = 'public';
|
$fields['access'] = 'public';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($fields['cat_id'])
|
if (is_array($cat_id))
|
||||||
{
|
{
|
||||||
$fields['cat_id'] = is_array($cat_id) ? implode(',',$cat_id) : $cat_id;
|
$fields['cat_id'] = count($cat_id) > 1 ? ','.implode(',',$cat_id).',' : $cat_id[0];
|
||||||
// make sure commas surround each value
|
}
|
||||||
$fields['cat_id'] = ',' . $fields['cat_id'] . ',';
|
else
|
||||||
|
{
|
||||||
|
$fields['cat_id'] = $cat_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
addressbook_add_entry($phpgw_info['user']['account_id'],$fields,$fields['access'],$fields['cat_id']);
|
addressbook_add_entry($phpgw_info['user']['account_id'],$fields,$fields['access'],$fields['cat_id']);
|
||||||
|
@ -204,11 +204,13 @@
|
|||||||
$fields['access'] = 'public';
|
$fields['access'] = 'public';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($fields['cat_id'])
|
if (is_array($cat_id))
|
||||||
{
|
{
|
||||||
$fields['cat_id'] = is_array($cat_id) ? implode(',',$cat_id) : $cat_id;
|
$fields['cat_id'] = count($cat_id) > 1 ? ','.implode(',',$cat_id).',' : $cat_id[0];
|
||||||
// make sure commas surround each value
|
}
|
||||||
$fields['cat_id'] = ',' . $fields['cat_id'] . ',';
|
else
|
||||||
|
{
|
||||||
|
$fields['cat_id'] = $cat_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($this->grants[$check[0]['owner']] & PHPGW_ACL_EDIT) && $check[0]['owner'] != $phpgw_info['user']['account_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