Skip to content

Commit

Permalink
graph: in case of aggregation, reset pi after initializing $obj
Browse files Browse the repository at this point in the history
Probably related to #122
  • Loading branch information
pommi committed Jun 22, 2015
1 parent 50170d1 commit fad32cf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
$typesdb = parse_typesdb_file($CONFIG['typesdb']);

if ($plugin == 'aggregation') {
$pi = explode("-", GET('pi'));
$plugin = $_GET['p'] = GET('p', $pi[0]);
$aggr = true;
$pi = explode("-", GET('pi'), 2);
$plugin = GET('p', $pi[0]);
}

# plugin json
Expand Down Expand Up @@ -81,6 +82,11 @@
break;
}

# in case of aggregation, reset pi after initializing $obj to get a correct title
if ($aggr) {
$_GET['pi'] = GET('pi', $pi[1]);
}

if (isset($typesdb[$type])) {
$obj->data_sources = array();
foreach ($typesdb[$type] as $ds => $property) {
Expand Down

0 comments on commit fad32cf

Please sign in to comment.