Skip to content

Commit

Permalink
Make sure RowEvolution uses graphEvolution default and make sure this…
Browse files Browse the repository at this point in the history
… default is saved correctly in client side parameter instead of being overwritten by saved viewDataTable.
  • Loading branch information
diosmosis committed Dec 4, 2014
1 parent e7c9010 commit 4f1e68e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions core/ViewDataTable/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ public static function build($defaultType = null, $apiAction = false, $controlle
$type = $defaultType ? : HtmlTable::ID;
}

$params['viewDataTable'] = $type;

$visualizations = Manager::getAvailableViewDataTables();

if (array_key_exists($type, $visualizations)) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/CoreHome/DataTableRowAction/RowEvolution.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class RowEvolution
* @param null|string $graphType
* @throws Exception
*/
public function __construct($idSite, $date, $graphType = null)
public function __construct($idSite, $date, $graphType = 'graphEvolution')
{
$this->apiMethod = Common::getRequestVar('apiMethod', '', 'string');
if (empty($this->apiMethod)) throw new Exception("Parameter apiMethod not set.");
Expand Down

0 comments on commit 4f1e68e

Please sign in to comment.