瀏覽代碼

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 年之前
父節點
當前提交
e04d686032
共有 1 個文件被更改,包括 10 次插入0 次删除
  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);
+	}
 }