Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2019-10-02 23:33:32 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2019-10-02 23:33:32 +0300
commit9e34ecd4ff43d19dee4b4e881545302d07887bb7 (patch)
treed10e41e1c860a53fc9d915640278fcf241f457e0 /core/Segment
parentf64e2e2ae4ed7197b76cd582709da71a4e065757 (diff)
Proper encoding of segment values for Actions reports. (#13481)
Diffstat (limited to 'core/Segment')
-rw-r--r--core/Segment/SegmentExpression.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/Segment/SegmentExpression.php b/core/Segment/SegmentExpression.php
index f9386fa440..4a85fc0abf 100644
--- a/core/Segment/SegmentExpression.php
+++ b/core/Segment/SegmentExpression.php
@@ -74,6 +74,15 @@ class SegmentExpression
protected $tree = array();
protected $parsedSubExpressions = array();
+ public function getSubExpressionCount()
+ {
+ $cleaned = array_filter($this->parsedSubExpressions, function ($part) {
+ $isExpressionColumnPresent = !empty($part[1][0]);
+ return $isExpressionColumnPresent;
+ });
+ return count($cleaned);
+ }
+
/**
* Given the array of parsed filters containing, for each filter,
* the boolean operator (AND/OR) and the operand,