mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-22 08:42:17 +02:00
#932: fixed a regression introduced by [r3319]... in case a criteria is present several times.
SVN:trunk[3344]
This commit is contained in:
@@ -1098,8 +1098,11 @@ class DBObjectSet
|
|||||||
{
|
{
|
||||||
foreach($aVals as $sCode => $oExpr)
|
foreach($aVals as $sCode => $oExpr)
|
||||||
{
|
{
|
||||||
$oScalarExpr = $oExpr->GetAsScalar($aScalarArgs);
|
if (is_object($oExpr)) // Array_merge_recursive creates an array when the same key is present multiple times... ignore them
|
||||||
$aConst[$sClassAlias][$sCode] = $oScalarExpr->GetValue();
|
{
|
||||||
|
$oScalarExpr = $oExpr->GetAsScalar($aScalarArgs);
|
||||||
|
$aConst[$sClassAlias][$sCode] = $oScalarExpr->GetValue();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $aConst;
|
return $aConst;
|
||||||
|
|||||||
@@ -299,13 +299,8 @@ class BinaryExpression extends Expression
|
|||||||
{
|
{
|
||||||
$aResult[$this->m_oRightExpr->GetParent()][$this->m_oRightExpr->GetName()] = $this->m_oLeftExpr;
|
$aResult[$this->m_oRightExpr->GetParent()][$this->m_oRightExpr->GetName()] = $this->m_oLeftExpr;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// Strictly, this should be removed
|
|
||||||
$aResult = array_merge_recursive($this->m_oRightExpr->ListConstantFields(), $this->m_oLeftExpr->ListConstantFields());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else if ($this->m_sOperator == 'AND')
|
||||||
{
|
{
|
||||||
// Strictly, this should be done only for the AND operator
|
// Strictly, this should be done only for the AND operator
|
||||||
$aResult = array_merge_recursive($this->m_oRightExpr->ListConstantFields(), $this->m_oLeftExpr->ListConstantFields());
|
$aResult = array_merge_recursive($this->m_oRightExpr->ListConstantFields(), $this->m_oLeftExpr->ListConstantFields());
|
||||||
|
|||||||
Reference in New Issue
Block a user