From 75861ccacc7ca2b8063a577a6019d42e370a78a2 Mon Sep 17 00:00:00 2001 From: Jaap Jansma <jaap.jansma@civicoop.org> Date: Fri, 9 Aug 2019 15:47:33 +0200 Subject: [PATCH] update --- .../CombinedDataFlow/CombinedSqlDataFlow.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Civi/DataProcessor/DataFlow/CombinedDataFlow/CombinedSqlDataFlow.php b/Civi/DataProcessor/DataFlow/CombinedDataFlow/CombinedSqlDataFlow.php index 31e7bace..edbf67ab 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 -- GitLab