diff options
author | mattab <matthieu.aubry@gmail.com> | 2015-07-01 16:18:40 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2015-07-01 16:18:40 +0300 |
commit | cfe56a0adc64e582e678d8cb1d08fd9f5beb9d21 (patch) | |
tree | 7e57b3ec02e98db47a6660601e16b9a11942813e /plugins/CoreHome/DataTableRowAction/RowEvolution.php | |
parent | 21829729dddc5427189697243a7f32abb21928ec (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.php | 6 |
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, |