mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
allow to specify cats by there id again
This commit is contained in:
parent
c6c034b291
commit
c545d8b95d
@ -103,9 +103,7 @@ function cat_id($cats)
|
||||
}
|
||||
|
||||
// no multiple cat's in InfoLog atm.
|
||||
$cats = array($cats); //split('[,;]',$cats);
|
||||
|
||||
foreach($cats as $k => $cat)
|
||||
foreach(array($cats) /*split('[,;]',$cats)*/ as $cat)
|
||||
{
|
||||
if (isset($cat2id[$cat]))
|
||||
{
|
||||
@ -117,7 +115,11 @@ function cat_id($cats)
|
||||
{
|
||||
$GLOBALS['phpgw']->categories = createobject('phpgwapi.categories');
|
||||
}
|
||||
if ($id = $GLOBALS['phpgw']->categories->name2id( addslashes($cat) ))
|
||||
if (is_numeric($cat) && $GLOBALS['phpgw']->categories->id2name($cat) != '--')
|
||||
{
|
||||
$cat2id[$cat] = $ids[$cat] = $cat;
|
||||
}
|
||||
elseif ($id = $GLOBALS['phpgw']->categories->name2id( addslashes($cat) ))
|
||||
{ // cat exists
|
||||
$cat2id[$cat] = $ids[$cat] = $id;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user