forked from extern/egroupware
Make add work for multiple cats, fix edit to write ,$value, instead of $value
This commit is contained in:
parent
33337decd9
commit
3bcb19e767
@ -196,7 +196,9 @@
|
||||
$fields['access'] = 'public';
|
||||
}
|
||||
|
||||
$fields["cat_id"] = $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'] . ',';
|
||||
|
||||
addressbook_add_entry($phpgw_info['user']['account_id'],$fields,$fields['access'],$fields['cat_id']);
|
||||
$ab_id = addressbook_get_lastid();
|
||||
|
@ -205,6 +205,8 @@
|
||||
}
|
||||
|
||||
$fields['cat_id'] = is_array($cat_id) ? implode(',',$cat_id) : $cat_id;
|
||||
// make sure commas surround each value
|
||||
$fields['cat_id'] = ',' . $fields['cat_id'] . ',';
|
||||
|
||||
if (($this->grants[$check[0]['owner']] & PHPGW_ACL_EDIT) && $check[0]['owner'] != $phpgw_info['user']['account_id'])
|
||||
{
|
||||
|
@ -205,8 +205,11 @@
|
||||
{
|
||||
while (list($key,$thiscat) = each($cats))
|
||||
{
|
||||
$catinfo = $cat->return_single($thiscat);
|
||||
$catname .= $catinfo[0]['name'] . '; ';
|
||||
if ($thiscat)
|
||||
{
|
||||
$catinfo = $cat->return_single($thiscat);
|
||||
$catname .= $catinfo[0]['name'] . '; ';
|
||||
}
|
||||
}
|
||||
if (!$cat_id)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user