From f6d0bda7375e9d1149c115068d1bb64745aa52b0 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Wed, 9 Jul 2014 09:47:21 +0000 Subject: [PATCH] Properly render the "CONCAT_WS" SQL expression used by the global search. SVN:trunk[3254] --- core/expression.class.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/expression.class.inc.php b/core/expression.class.inc.php index 4d1b1fb7f..b9516f678 100644 --- a/core/expression.class.inc.php +++ b/core/expression.class.inc.php @@ -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); + } }