浏览代码

Fixed regression introduced with [3912] and partially fixed in [3954] : when the autocomplete is active, then the search dialog was not working anymore.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3972 a333f486-631f-4898-b8df-5754b55c2be0
romainq 9 年之前
父节点
当前提交
dbe7f19899
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      core/dbobjectset.class.php

+ 3 - 2
core/dbobjectset.class.php

@@ -1072,7 +1072,8 @@ class DBObjectSet
 	 */
 	 */
 	public function ListConstantFields()
 	public function ListConstantFields()
 	{
 	{
-		$aScalarArgs = array_merge($this->m_oFilter->GetInternalParams(), $this->m_aArgs);
+		// The complete list of arguments will include magic arguments (e.g. current_user->attcode)
+		$aScalarArgs = MetaModel::PrepareQueryArguments($this->m_oFilter->GetInternalParams(), $this->m_aArgs);
 		$aConst = $this->m_oFilter->ListConstantFields();
 		$aConst = $this->m_oFilter->ListConstantFields();
 				
 				
 		foreach($aConst as $sClassAlias => $aVals)
 		foreach($aConst as $sClassAlias => $aVals)
@@ -1091,7 +1092,7 @@ class DBObjectSet
 	
 	
 	public function ApplyParameters()
 	public function ApplyParameters()
 	{
 	{
-		$aAllArgs = array_merge($this->m_aArgs, $this->m_oFilter->GetInternalParams());
+		$aAllArgs = MetaModel::PrepareQueryArguments($this->m_oFilter->GetInternalParams(), $this->m_aArgs);
 		$this->m_oFilter->ApplyParameters($aAllArgs);
 		$this->m_oFilter->ApplyParameters($aAllArgs);
 	}
 	}
 }
 }