mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:05:16 +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...) */
|
||||
if($name == 'phpgwcontactcatid')
|
||||
{
|
||||
$aquery .= '(|(' . $name . '=*,' . $value . ',*)'.
|
||||
'(' . $name . '=' . $value . '))';
|
||||
if (!is_object($GLOBALS['phpgw']->categories))
|
||||
{
|
||||
$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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user