mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 17:14:44 +01:00
fix for search to return also the entries from sub-categoris, as sugested by Stephan Hilchenbach from the german list
This commit is contained in:
parent
4b7ced6e84
commit
ba4ed68752
@ -594,8 +594,18 @@
|
|||||||
/* exact value (filtering based on tid, etc...) */
|
/* exact value (filtering based on tid, etc...) */
|
||||||
if($name == 'phpgwcontactcatid')
|
if($name == 'phpgwcontactcatid')
|
||||||
{
|
{
|
||||||
$aquery .= '(|(' . $name . '=*,' . $value . ',*)'.
|
if (!is_object($GLOBALS['phpgw']->categories))
|
||||||
'(' . $name . '=' . $value . '))';
|
{
|
||||||
|
$GLOBALS['phpgw']->categories = CreateObject('phpgwapi.categories');
|
||||||
|
}
|
||||||
|
$cats = $GLOBALS['phpgw']->categories->return_all_children((int)$value);
|
||||||
|
|
||||||
|
$aquery .= '(|';
|
||||||
|
foreach($cats as $cat)
|
||||||
|
{
|
||||||
|
$aquery .= '(' . $name . '=*,' . $cat . ',*)(' . $name . '=' . $cat . ')';
|
||||||
|
}
|
||||||
|
$aquery .= ')';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user