mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Internal: query arguments could be array values, making it easier to build dynamic IN() clauses
SVN:trunk[4006]
This commit is contained in:
@@ -2488,7 +2488,10 @@ abstract class MetaModel
|
||||
{
|
||||
$aScalarArgs[$sArgName] = null;
|
||||
}
|
||||
// otherwise... could be an array coming from the extra params...
|
||||
elseif (is_array($value))
|
||||
{
|
||||
$aScalarArgs[$sArgName] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Add standard magic arguments
|
||||
|
||||
@@ -648,7 +648,12 @@ class VariableExpression extends UnaryExpression
|
||||
}
|
||||
elseif (array_key_exists($this->m_sName, $aArgs))
|
||||
{
|
||||
return CMDBSource::Quote($aArgs[$this->m_sName]);
|
||||
$res = CMDBSource::Quote($aArgs[$this->m_sName]);
|
||||
if (is_array($res))
|
||||
{
|
||||
$res = implode(', ', $res);
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
elseif (($iPos = strpos($this->m_sName, '->')) !== false)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user