Browse Source

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

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3254 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 11 years ago
parent
commit
e04d686032
1 changed files with 10 additions and 0 deletions
  1. 10 0
      core/expression.class.inc.php

+ 10 - 0
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);
+	}
 }