Forráskód Böngészése

Magic query arguments - fixed a regression: URL exceeding 4000 characters (!) because the serialized queries were including magic arguments. Those arguments must be computed right before executing the query. An alternative to this implementation could be to serialize a DBSearch with its parameters computed at serialization time.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3939 a333f486-631f-4898-b8df-5754b55c2be0
romainq 9 éve
szülő
commit
d33a2ebc7e
1 módosított fájl, 3 hozzáadás és 3 törlés
  1. 3 3
      core/dbobjectset.class.php

+ 3 - 3
core/dbobjectset.class.php

@@ -366,7 +366,7 @@ class DBObjectSet
 		$oFilter = $this->m_oFilter->DeepClone();
 		// Note: the arguments found within a set can be object (but not in a filter)
 		// That's why PrepareQueryArguments must be invoked there
-		$oFilter->SetInternalParams(array_merge($oFilter->GetInternalParams(), MetaModel::PrepareQueryArguments($this->m_aArgs)));
+		$oFilter->SetInternalParams(array_merge($oFilter->GetInternalParams(), $this->m_aArgs));
 		
 		if (count($this->m_aAddedIds) == 0)
 		{
@@ -1091,8 +1091,8 @@ class DBObjectSet
 	
 	public function ApplyParameters()
 	{
-		$aScalarArgs = MetaModel::PrepareQueryArguments($this->m_aArgs, $this->m_oFilter->GetInternalParams());
-		$this->m_oFilter->ApplyParameters($aScalarArgs);
+		$aAllArgs = array_merge($this->m_aArgs, $this->m_oFilter->GetInternalParams());
+		$this->m_oFilter->ApplyParameters($aAllArgs);
 	}
 }