diff --git a/Civi/DataProcessor/DataFlow/CombinedDataFlow/CombinedSqlDataFlow.php b/Civi/DataProcessor/DataFlow/CombinedDataFlow/CombinedSqlDataFlow.php index 31e7baced090ad68fdaaac6fc53da2b6bfb175c9..edbf67ab05ca827fbcfa633470641f24e7daf45f 100644 --- a/Civi/DataProcessor/DataFlow/CombinedDataFlow/CombinedSqlDataFlow.php +++ b/Civi/DataProcessor/DataFlow/CombinedDataFlow/CombinedSqlDataFlow.php @@ -215,5 +215,24 @@ class CombinedSqlDataFlow extends SqlDataFlow implements MultipleSourceDataFlows return $this->primary_table_alias; } + /** + * @param \Civi\DataProcessor\DataFlow\SqlDataFlow\WhereClauseInterface $clause + * + * @return \Civi\DataProcessor\DataFlow\SqlDataFlow + */ + public function removeWhereClause(SqlDataFlow\WhereClauseInterface $clause) { + foreach($this->whereClauses as $i => $c) { + if ($c->getWhereClause() == $clause->getWhereClause()) { + unset($this->whereClauses[$i]); + } + } + foreach($this->sourceDataFlowDescriptions as $sourceDataFlowDescription) { + if ($sourceDataFlowDescription->getDataFlow() instanceof SqlDataFlow) { + $sourceDataFlowDescription->getDataFlow()->removeWhereClause($clause); + } + } + return $this; + } + } \ No newline at end of file