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'), 'p'); | 7 | $plugin = GET('p'); |
8 | $type = validate_get(GET('t'), 't'); | 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'), 'h') === 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], 'p'); | 34 | $plugin = $_GET['p'] = GET('p', $pi[0]); |
35 | } | 35 | } |
36 | 36 | ||
37 | # plugin json | 37 | # plugin json |
@@ -49,19 +49,19 @@ if (!isset($plugin_json[$type]['type'])) | |||
49 | switch ($plugin_json[$type]['type']) { | 49 | switch ($plugin_json[$type]['type']) { |
50 | case 'stacked': | 50 | case 'stacked': |
51 | require_once 'type/GenericStacked.class.php'; | 51 | require_once 'type/GenericStacked.class.php'; |
52 | $obj = new Type_GenericStacked($CONFIG, $_GET); | 52 | $obj = new Type_GenericStacked($CONFIG, GET()); |
53 | break; | 53 | break; |
54 | case 'io': | 54 | case 'io': |
55 | require_once 'type/GenericIO.class.php'; | 55 | require_once 'type/GenericIO.class.php'; |
56 | $obj = new Type_GenericIO($CONFIG, $_GET); | 56 | $obj = new Type_GenericIO($CONFIG, GET()); |
57 | break; | 57 | break; |
58 | case 'uptime': | 58 | case 'uptime': |
59 | require_once 'type/Uptime.class.php'; | 59 | require_once 'type/Uptime.class.php'; |
60 | $obj = new Type_Uptime($CONFIG, $_GET); | 60 | $obj = new Type_Uptime($CONFIG, GET()); |
61 | break; | 61 | break; |
62 | default: | 62 | default: |
63 | require_once 'type/Default.class.php'; | 63 | require_once 'type/Default.class.php'; |
64 | $obj = new Type_Default($CONFIG, $_GET); | 64 | $obj = new Type_Default($CONFIG, GET()); |
65 | break; | 65 | break; |
66 | } | 66 | } |
67 | 67 | ||