mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-09 15:38:27 +01:00
allow to specify cats by there id again
This commit is contained in:
parent
b20e6ab27f
commit
9819f08b48
@ -90,9 +90,7 @@
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$cats = split('[,;]',$cats);
|
foreach(split('[,;]',$cats) as $cat)
|
||||||
|
|
||||||
while(list($k,$cat) = each($cats))
|
|
||||||
{
|
{
|
||||||
if(isset($cat2id[$cat]))
|
if(isset($cat2id[$cat]))
|
||||||
{
|
{
|
||||||
@ -104,7 +102,11 @@
|
|||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->categories = createobject('phpgwapi.categories');
|
$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
|
{ // cat exists
|
||||||
$cat2id[$cat] = $ids[$cat] = $id;
|
$cat2id[$cat] = $ids[$cat] = $id;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user