diff options
author | Pim van den Berg | 2015-06-22 11:45:45 +0200 |
---|---|---|
committer | Pim van den Berg | 2015-06-22 11:49:13 +0200 |
commit | fad32cf4fbf5ad686b670f8500686d4b10ba702a (patch) | |
tree | 76b2b38ec4ca0857ce29eadc7b49a48cc7e02afe /graph.php | |
parent | graph: only use local json when no json provided by CGP (diff) | |
download | apt-panopticon_cgp-fad32cf4fbf5ad686b670f8500686d4b10ba702a.zip apt-panopticon_cgp-fad32cf4fbf5ad686b670f8500686d4b10ba702a.tar.gz apt-panopticon_cgp-fad32cf4fbf5ad686b670f8500686d4b10ba702a.tar.bz2 apt-panopticon_cgp-fad32cf4fbf5ad686b670f8500686d4b10ba702a.tar.xz |
graph: in case of aggregation, reset pi after initializing $obj
Probably related to #122
Diffstat (limited to '')
-rw-r--r-- | graph.php | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -30,8 +30,9 @@ if (GET('h') === NULL) { | |||
30 | $typesdb = parse_typesdb_file($CONFIG['typesdb']); | 30 | $typesdb = parse_typesdb_file($CONFIG['typesdb']); |
31 | 31 | ||
32 | if ($plugin == 'aggregation') { | 32 | if ($plugin == 'aggregation') { |
33 | $pi = explode("-", GET('pi')); | 33 | $aggr = true; |
34 | $plugin = $_GET['p'] = GET('p', $pi[0]); | 34 | $pi = explode("-", GET('pi'), 2); |
35 | $plugin = GET('p', $pi[0]); | ||
35 | } | 36 | } |
36 | 37 | ||
37 | # plugin json | 38 | # plugin json |
@@ -81,6 +82,11 @@ switch ($plugin_json[$type]['type']) { | |||
81 | break; | 82 | break; |
82 | } | 83 | } |
83 | 84 | ||
85 | # in case of aggregation, reset pi after initializing $obj to get a correct title | ||
86 | if ($aggr) { | ||
87 | $_GET['pi'] = GET('pi', $pi[1]); | ||
88 | } | ||
89 | |||
84 | if (isset($typesdb[$type])) { | 90 | if (isset($typesdb[$type])) { |
85 | $obj->data_sources = array(); | 91 | $obj->data_sources = array(); |
86 | foreach ($typesdb[$type] as $ds => $property) { | 92 | foreach ($typesdb[$type] as $ds => $property) { |