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>2015-10-20 02:48:53 +0300
committerdiosmosis <benaka@piwik.pro>2015-10-20 02:48:53 +0300
commit40f8b6b6a6f27100a24fe71f13fa4c34cd542501 (patch)
tree53607efcdbb14255c3f3249364515ab301b1eaa0 /plugins/Events
parent48ca332907257c35a7d94c1b120c9ad6cfaf320d (diff)
If average event value is empty, set it to 0 when creating event value tooltip.
Diffstat (limited to 'plugins/Events')
-rw-r--r--plugins/Events/Events.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/Events/Events.php b/plugins/Events/Events.php
index ba3e96465d..406b7c94d1 100644
--- a/plugins/Events/Events.php
+++ b/plugins/Events/Events.php
@@ -197,13 +197,16 @@ class Events extends \Piwik\Plugin
}
- private function addTooltipEventValue($view)
+ private function addTooltipEventValue(ViewDataTable $view)
{
// Creates the tooltip message for Event Value column
$tooltipCallback = function ($hits, $min, $max, $avg) {
if (!$hits) {
return false;
}
+
+ $avg = $avg ?: 0;
+
$msgEventMinMax = Piwik::translate("Events_EventValueTooltip", array($hits, "<br />", $min, $max));
$msgEventAvg = Piwik::translate("Events_AvgEventValue", $avg);
return $msgEventMinMax . "<br/>" . $msgEventAvg;