Explorar o código

#932 Search form should be prefilled when running a search "shortcut" - very little progress: fixed the case when several criteria are given

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3319 a333f486-631f-4898-b8df-5754b55c2be0
romainq %!s(int64=10) %!d(string=hai) anos
pai
achega
90344bf16d
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      core/expression.class.inc.php

+ 4 - 2
core/expression.class.inc.php

@@ -301,12 +301,14 @@ class BinaryExpression extends Expression
 			}
 			else
 			{
-				$aResult = array_merge($this->m_oRightExpr->ListConstantFields(), $this->m_oLeftExpr->ListConstantFields()) ;
+				// Strictly, this should be removed
+				$aResult = array_merge_recursive($this->m_oRightExpr->ListConstantFields(), $this->m_oLeftExpr->ListConstantFields());
 			}
 		}
 		else
 		{
-			$aResult = array_merge($this->m_oRightExpr->ListConstantFields(), $this->m_oLeftExpr->ListConstantFields()) ;
+			// Strictly, this should be done only for the AND operator
+			$aResult = array_merge_recursive($this->m_oRightExpr->ListConstantFields(), $this->m_oLeftExpr->ListConstantFields());
 		}
 		return $aResult;
 	}