From 7812f6ddccee71d5ed45810b9e5940e1b315a7d8 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 19 Aug 2015 11:23:40 +0200 Subject: [PATCH] DataView: Remove obsolete $filter property --- .../library/Monitoring/DataView/DataView.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/monitoring/library/Monitoring/DataView/DataView.php b/modules/monitoring/library/Monitoring/DataView/DataView.php index 513e419fb..ac4e6bc9f 100644 --- a/modules/monitoring/library/Monitoring/DataView/DataView.php +++ b/modules/monitoring/library/Monitoring/DataView/DataView.php @@ -29,8 +29,6 @@ abstract class DataView implements QueryInterface, SortRules, FilterColumns, Ite */ protected $query; - protected $filter; - protected $connection; protected $isSorted = false; @@ -52,7 +50,6 @@ abstract class DataView implements QueryInterface, SortRules, FilterColumns, Ite { $this->connection = $connection; $this->query = $connection->query($this->getQueryName(), $columns); - $this->filter = Filter::matchAll(); } /** @@ -91,7 +88,6 @@ abstract class DataView implements QueryInterface, SortRules, FilterColumns, Ite public function where($condition, $value = null) { - $this->filter->addFilter(Filter::where($condition, $value)); $this->query->where($condition, $value); return $this; } @@ -268,9 +264,14 @@ abstract class DataView implements QueryInterface, SortRules, FilterColumns, Ite return $columns; } + /** + * Return the current filter + * + * @return Filter + */ public function getFilter() { - return $this->filter; + return $this->query->getFilter(); } /** @@ -471,8 +472,7 @@ abstract class DataView implements QueryInterface, SortRules, FilterColumns, Ite */ public function addFilter(Filter $filter) { - $this->query->addFilter(clone($filter)); - $this->filter = $filter; // TODO: Hmmmm.... and? + $this->query->addFilter($filter); return $this; }