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:
authormattab <matthieu.aubry@gmail.com>2015-09-28 10:19:00 +0300
committermattab <matthieu.aubry@gmail.com>2015-09-28 10:19:00 +0300
commit97f91341f81e972dff50e08702ea6fc088d90eed (patch)
tree2c82c230f7897c8d9acbc9dcc98bfea9bd06669e /core/Segment
parentd2bbd04ce62b284b002433ad021544fda94cc78f (diff)
Caching id actions in general cache - can be enabled via INI setting enable_segments_subquery_cache setting (disabled by default)
Diffstat (limited to 'core/Segment')
-rw-r--r--core/Segment/SegmentExpression.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/Segment/SegmentExpression.php b/core/Segment/SegmentExpression.php
index a6aecc6c29..7eac1bcdb0 100644
--- a/core/Segment/SegmentExpression.php
+++ b/core/Segment/SegmentExpression.php
@@ -192,6 +192,12 @@ class SegmentExpression
// eg. pageUrl!=DoesNotExist
// Not equal to NULL means it matches all rows
$sqlExpression = self::SQL_WHERE_MATCHES_ALL_ROWS;
+ } elseif($matchType == self::MATCH_CONTAINS
+ || $matchType == self::MATCH_DOES_NOT_CONTAIN) {
+ // no action was found for CONTAINS / DOES NOT CONTAIN
+ // eg. pageUrl=@DoesNotExist -> matches no row
+ // eg. pageUrl!@DoesNotExist -> matches no rows
+ $sqlExpression = self::SQL_WHERE_DO_NOT_MATCH_ANY_ROW;
} else {
// it is not expected to reach this code path
throw new Exception("Unexpected match type $matchType for your segment. " .
@@ -280,8 +286,13 @@ class SegmentExpression
}
$sqlExpressions[] = $sqlExpression;
+
if ($value !== null) {
- $values[] = $value;
+ if(is_array($value)) {
+ $values = array_merge($values, $value);
+ } else {
+ $values[] = $value;
+ }
}
$this->checkFieldIsAvailable($field, $availableTables);