update Piwik to version 2.16 (fixes #91)

This commit is contained in:
oliver 2016-04-10 18:55:57 +02:00
commit d885a4baa9
5833 changed files with 418860 additions and 226988 deletions

View file

@ -1,6 +1,6 @@
<?php
/**
* Piwik - Open source web analytics
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
@ -32,6 +32,7 @@ class Sparkline implements ViewInterface
public static $enableSparklineImages = true;
private static $colorNames = array('backgroundColor', 'lineColor', 'minPointColor', 'lastPointColor', 'maxPointColor');
private $values = array();
/**
* Width of the sparkline
@ -60,7 +61,6 @@ class Sparkline implements ViewInterface
*/
public function setHeight($height)
{
if (!is_numeric($height) || $height <= 0) {
return;
}
@ -74,7 +74,6 @@ class Sparkline implements ViewInterface
*/
public function setWidth($width)
{
if (!is_numeric($width) || $width <= 0) {
return;
}
@ -110,7 +109,9 @@ class Sparkline implements ViewInterface
$min = $max = $last = null;
$i = 0;
$toRemove = array('%', str_replace('%s', '', Piwik::translate('General_Seconds')));
$seconds = Piwik::translate('Intl_NSecondsShort');
$toRemove = array('%', str_replace('%s', '', $seconds));
foreach ($this->values as $value) {
// 50% and 50s should be plotted as 50
$value = str_replace($toRemove, '', $value);
@ -158,6 +159,7 @@ class Sparkline implements ViewInterface
private function setSparklineColors($sparkline)
{
$colors = Common::getRequestVar('colors', false, 'json');
if (empty($colors)) { // quick fix so row evolution sparklines will have color in widgetize's iframes
$colors = array(
'backgroundColor' => '#ffffff',