diff options
Diffstat (limited to '')
-rw-r--r-- | graph.php | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -4,8 +4,8 @@ require_once 'conf/common.inc.php'; | |||
4 | require_once 'inc/functions.inc.php'; | 4 | require_once 'inc/functions.inc.php'; |
5 | require_once 'inc/collectd.inc.php'; | 5 | require_once 'inc/collectd.inc.php'; |
6 | 6 | ||
7 | $plugin = validate_get(GET('p'), 'plugin'); | 7 | $plugin = GET('p'); |
8 | $type = validate_get(GET('t'), 'type'); | 8 | $type = GET('t'); |
9 | $width = GET('x') ? filter_var(GET('x'), FILTER_VALIDATE_INT, array( | 9 | $width = GET('x') ? filter_var(GET('x'), FILTER_VALIDATE_INT, array( |
10 | 'min_range' => 10, | 10 | 'min_range' => 10, |
11 | 'max_range' => $CONFIG['max-width'] | 11 | 'max_range' => $CONFIG['max-width'] |
@@ -18,12 +18,12 @@ $height = GET('y') ? filter_var(GET('y'), FILTER_VALIDATE_INT, array( | |||
18 | if ($width === NULL || $height === NULL) { | 18 | if ($width === NULL || $height === NULL) { |
19 | error_log(sprintf('Invalid image dimension, x="%s", y="%s"', | 19 | error_log(sprintf('Invalid image dimension, x="%s", y="%s"', |
20 | urlencode(GET('x')), | 20 | urlencode(GET('x')), |
21 | urlencode(GET('y')))); | 21 | urlencode(GET('y')) |
22 | )); | ||
22 | error_image(); | 23 | error_image(); |
23 | } | 24 | } |
24 | 25 | ||
25 | if (validate_get(GET('h'), 'host') === NULL) { | 26 | if (GET('h') === NULL) { |
26 | error_log('Invalid host: "' . urlencode(GET('h')) . '"'); | ||
27 | error_image(); | 27 | error_image(); |
28 | } | 28 | } |
29 | 29 | ||
@@ -31,7 +31,7 @@ $typesdb = parse_typesdb_file($CONFIG['typesdb']); | |||
31 | 31 | ||
32 | if ($plugin == 'aggregation') { | 32 | if ($plugin == 'aggregation') { |
33 | $pi = explode("-", GET('pi')); | 33 | $pi = explode("-", GET('pi')); |
34 | $plugin = $_GET['p'] = validate_get($pi[0], 'plugin'); | 34 | $plugin = $_GET['p'] = GET('p', $pi[0]); |
35 | } | 35 | } |
36 | 36 | ||
37 | # plugin json | 37 | # plugin json |
@@ -61,19 +61,19 @@ if (!isset($plugin_json[$type]['type'])) | |||
61 | switch ($plugin_json[$type]['type']) { | 61 | switch ($plugin_json[$type]['type']) { |
62 | case 'stacked': | 62 | case 'stacked': |
63 | require_once 'type/GenericStacked.class.php'; | 63 | require_once 'type/GenericStacked.class.php'; |
64 | $obj = new Type_GenericStacked($CONFIG, $_GET); | 64 | $obj = new Type_GenericStacked($CONFIG, GET()); |
65 | break; | 65 | break; |
66 | case 'io': | 66 | case 'io': |
67 | require_once 'type/GenericIO.class.php'; | 67 | require_once 'type/GenericIO.class.php'; |
68 | $obj = new Type_GenericIO($CONFIG, $_GET); | 68 | $obj = new Type_GenericIO($CONFIG, GET()); |
69 | break; | 69 | break; |
70 | case 'uptime': | 70 | case 'uptime': |
71 | require_once 'type/Uptime.class.php'; | 71 | require_once 'type/Uptime.class.php'; |
72 | $obj = new Type_Uptime($CONFIG, $_GET); | 72 | $obj = new Type_Uptime($CONFIG, GET()); |
73 | break; | 73 | break; |
74 | default: | 74 | default: |
75 | require_once 'type/Default.class.php'; | 75 | require_once 'type/Default.class.php'; |
76 | $obj = new Type_Default($CONFIG, $_GET); | 76 | $obj = new Type_Default($CONFIG, GET()); |
77 | break; | 77 | break; |
78 | } | 78 | } |
79 | 79 | ||