Properly render the "CONCAT_WS" SQL expression used by the global search.

SVN:trunk[3254]
This commit is contained in:
Denis Flaven
2014-07-09 09:47:21 +00:00
parent a64b299644
commit f6d0bda737

View File

@@ -1181,6 +1181,16 @@ class CharConcatWSExpression extends CharConcatExpression
$sSep = CMDBSource::Quote($this->m_separator);
return "CAST(CONCAT_WS($sSep, ".implode(', ', $aRes).") AS CHAR)";
}
public function Translate($aTranslationData, $bMatchAll = true, $bMarkFieldsAsResolved = true)
{
$aRes = array();
foreach ($this->m_aExpressions as $oExpr)
{
$aRes[] = $oExpr->Translate($aTranslationData, $bMatchAll, $bMarkFieldsAsResolved);
}
return new CharConcatWSExpression($this->m_separator, $aRes);
}
}