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-07-01 16:18:40 +0300
committermattab <matthieu.aubry@gmail.com>2015-07-01 16:18:40 +0300
commitcfe56a0adc64e582e678d8cb1d08fd9f5beb9d21 (patch)
tree7e57b3ec02e98db47a6660601e16b9a11942813e /plugins/CoreHome/DataTableRowAction/RowEvolution.php
parent21829729dddc5427189697243a7f32abb21928ec (diff)
Display useful message when period or label is invalid
Diffstat (limited to 'plugins/CoreHome/DataTableRowAction/RowEvolution.php')
-rw-r--r--plugins/CoreHome/DataTableRowAction/RowEvolution.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/CoreHome/DataTableRowAction/RowEvolution.php b/plugins/CoreHome/DataTableRowAction/RowEvolution.php
index 85fa98bc3e..c27dc28529 100644
--- a/plugins/CoreHome/DataTableRowAction/RowEvolution.php
+++ b/plugins/CoreHome/DataTableRowAction/RowEvolution.php
@@ -11,11 +11,11 @@ namespace Piwik\Plugins\CoreHome\DataTableRowAction;
use Exception;
use Piwik\API\DataTablePostProcessor;
use Piwik\API\Request;
-use Piwik\API\ResponseBuilder;
use Piwik\Common;
use Piwik\DataTable;
use Piwik\Date;
use Piwik\Metrics;
+use Piwik\Period\Factory as PeriodFactory;
use Piwik\Piwik;
use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Evolution as EvolutionViz;
use Piwik\Url;
@@ -95,7 +95,7 @@ class RowEvolution
if ($this->label === '') throw new Exception("Parameter label not set.");
$this->period = Common::getRequestVar('period', '', 'string');
- if (empty($this->period)) throw new Exception("Parameter period not set.");
+ PeriodFactory::checkPeriodIsEnabled($this->period);
$this->idSite = $idSite;
$this->graphType = $graphType;
@@ -146,7 +146,7 @@ class RowEvolution
$parameters = array(
'method' => 'API.getRowEvolution',
- 'label' => $this->label,
+ 'label' => urlencode($this->label),
'apiModule' => $apiModule,
'apiAction' => $apiAction,
'idSite' => $this->idSite,