N°2970 - Reset conditions of joined filter because they can be used later by the Filter() method

This commit is contained in:
Eric
2020-06-03 11:47:12 +02:00
parent f301a283e2
commit 8064a20718
3 changed files with 58 additions and 6 deletions

View File

@@ -313,6 +313,11 @@ class DBObjectSearch extends DBSearch
return true;
}
/**
* Move conditions from $oFilter to $this
* @param \DBSearch $oFilter
* @param $aTranslation
*/
protected function TransferConditionExpression($oFilter, $aTranslation)
{
// Prevent collisions in the parameter names by renaming them if needed
@@ -335,6 +340,7 @@ class DBObjectSearch extends DBSearch
$oTranslated = $oFilter->GetCriteria()->Translate($aTranslation, false, false /* leave unresolved fields */);
$this->AddConditionExpression($oTranslated);
$this->m_aParams = array_merge($this->m_aParams, $oFilter->m_aParams);
$oFilter->ResetCondition();
}
public function RenameParam($sOldName, $sNewName)