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:
authorStefan Giehl <stefan@piwik.org>2018-04-23 07:20:37 +0300
committerMatthieu Aubry <mattab@users.noreply.github.com>2018-04-23 07:20:37 +0300
commit14ba6a44029e29a9336efdd482875df641bd2a82 (patch)
tree12e97f7af52a0cde48142674c3b79dcb1b628c4f /plugins/Live/Model.php
parenteff059cd5825fc8967673cb0a2f96ed7564f3c65 (diff)
Show information in visitor profile if dataset was "truncated" (#12376)
* Show overall visit count in visitor profile if there have been more visits than shown in the summary * update/ add tests
Diffstat (limited to 'plugins/Live/Model.php')
-rw-r--r--plugins/Live/Model.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/Live/Model.php b/plugins/Live/Model.php
index a475536da5..107fba7f98 100644
--- a/plugins/Live/Model.php
+++ b/plugins/Live/Model.php
@@ -40,7 +40,10 @@ class Model
{
list($sql, $bind) = $this->makeLogVisitsQueryString($idSite, $period, $date, $segment, $offset, $limit, $visitorId, $minTimestamp, $filterSortOrder);
- return Db::fetchAll($sql, $bind);
+ $visits = Db::fetchAll($sql, $bind);
+ $rowCount = Db::fetchOne('SELECT FOUND_ROWS()');
+
+ return [$rowCount, $visits];
}
/**
@@ -274,7 +277,7 @@ class Model
// 1) when a visitor converts 2 goals
// 2) when an Action Segment is used, the inner query will return one row per action, but we want one row per visit
$sql = "
- SELECT sub.* FROM (
+ SELECT SQL_CALC_FOUND_ROWS sub.* FROM (
" . $innerQuery['sql'] . "
) AS sub
GROUP BY sub.idvisit