mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°2970 - Reset conditions of joined filter because they can be used later by the Filter() method
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user