mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-03 23:48:44 +02:00
Advanced Search: External keys to hierarchical class selects sub-classes as in previous version
SVN:trunk[5675]
This commit is contained in:
@@ -47,22 +47,22 @@ class CriterionParser
|
||||
*/
|
||||
public static function Parse($sBaseOql, $aCriterion, $sHiddenCriteria = null)
|
||||
{
|
||||
$aExpression = array();
|
||||
$aOr = $aCriterion['or'];
|
||||
foreach($aOr as $aAndList)
|
||||
{
|
||||
|
||||
$sExpression = self::ParseAndList($aAndList['and']);
|
||||
if (!empty($sExpression))
|
||||
{
|
||||
$aExpression[] = $sExpression;
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$oSearch = DBObjectSearch::FromOQL($sBaseOql);
|
||||
|
||||
$aExpression = array();
|
||||
$aOr = $aCriterion['or'];
|
||||
foreach($aOr as $aAndList)
|
||||
{
|
||||
|
||||
$sExpression = self::ParseAndList($oSearch, $aAndList['and']);
|
||||
if (!empty($sExpression))
|
||||
{
|
||||
$aExpression[] = $sExpression;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($sHiddenCriteria))
|
||||
{
|
||||
$oHiddenCriteriaExpression = Expression::FromOQL($sHiddenCriteria);
|
||||
@@ -85,13 +85,13 @@ class CriterionParser
|
||||
return null;
|
||||
}
|
||||
|
||||
private static function ParseAndList($aAnd)
|
||||
private static function ParseAndList($oSearch, $aAnd)
|
||||
{
|
||||
$aExpression = array();
|
||||
foreach($aAnd as $aCriteria)
|
||||
{
|
||||
|
||||
$sExpression = CriterionToOQL::Convert($aCriteria);
|
||||
$sExpression = CriterionToOQL::Convert($oSearch, $aCriteria);
|
||||
if ($sExpression !== '1')
|
||||
{
|
||||
$aExpression[] = $sExpression;
|
||||
|
||||
Reference in New Issue
Block a user