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 <benaka@piwik.pro>2014-11-04 22:19:27 +0300
committerdiosmosis <benaka@piwik.pro>2014-11-04 22:19:27 +0300
commitb328b5ebc10fdfeeff6424933cb6ba172c6c2cb8 (patch)
tree6377a97a5b681cd4c90624b36ed54035d837fcb6 /plugins/CoreHome/DataTableRowAction/RowEvolution.php
parent548a33d380bf51cd9e36cd41701368f66de2e94c (diff)
Do not display nb_users series in row evolution is no data for the metric.
Diffstat (limited to 'plugins/CoreHome/DataTableRowAction/RowEvolution.php')
-rw-r--r--plugins/CoreHome/DataTableRowAction/RowEvolution.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/CoreHome/DataTableRowAction/RowEvolution.php b/plugins/CoreHome/DataTableRowAction/RowEvolution.php
index b0922f05bf..6f2db7ab9d 100644
--- a/plugins/CoreHome/DataTableRowAction/RowEvolution.php
+++ b/plugins/CoreHome/DataTableRowAction/RowEvolution.php
@@ -229,6 +229,14 @@ class RowEvolution
list($first, $last) = $this->getFirstAndLastDataPointsForMetric($metric);
$details = Piwik::translate('RowEvolution_MetricBetweenText', array($first, $last));
+ // TODO: this check should be determined by metric metadata, not hardcoded here
+ if ($metric == 'nb_users'
+ && $first == 0
+ && $last == 0
+ ) {
+ continue;
+ }
+
if ($change !== false) {
$lowerIsBetter = Metrics::isLowerValueBetter($metric);
if (substr($change, 0, 1) == '+') {