diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2019-05-02 08:39:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-02 08:39:21 +0300 |
commit | cbd5899aab6276544d7ba2b51946839bb63bec62 (patch) | |
tree | 7a353af9f871edba50579894e51615c6a72a5bbf /plugins/CoreVisualizations/Visualizations | |
parent | 2b4eaf16b81b166f2af308e7ce822db5c0a00716 (diff) |
Make sure evolution parameters are initialized in Config so Controllers can override them. (#14386)
Diffstat (limited to 'plugins/CoreVisualizations/Visualizations')
-rw-r--r-- | plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php | 3 | ||||
-rw-r--r-- | plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution/Config.php | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php index 143f841adb..ae8e260bc1 100644 --- a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php +++ b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php @@ -85,9 +85,6 @@ class Evolution extends JqplotGraph $originalDate = Common::getRequestVar('date', 'last' . $defaultLastN, 'string'); if ('range' != $period) { // show evolution limit if the period is not a range - $this->config->show_limit_control = true; - $this->config->show_periods = true; - // set the evolution_{$period}_last_n query param if (Range::parseDateRange($originalDate)) { // if a multiple period diff --git a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution/Config.php b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution/Config.php index d1482959a4..8b3745a390 100644 --- a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution/Config.php +++ b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution/Config.php @@ -9,6 +9,7 @@ namespace Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Evolution; +use Piwik\Common; use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Config as JqplotGraphConfig; /** @@ -36,6 +37,12 @@ class Config extends JqplotGraphConfig $this->addPropertiesThatShouldBeAvailableClientSide(array('show_line_graph')); $this->addPropertiesThatCanBeOverwrittenByQueryParams(array('show_line_graph')); + + $period = Common::getRequestVar('period'); + if ($period !== 'range') { + $this->show_limit_control = true; + $this->show_periods = true; + } } } |