From ae3d54cedf14af7fcf4ee93fe363a1d7947471a4 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 5 Mar 2021 11:11:19 +0100 Subject: [PATCH] B64 included in user options --- pandora_console/include/functions_api.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index dfc0fe1dc5..4a14cd1e56 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -13766,17 +13766,23 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4) return; } + $user_defined = false; if (is_array($other['data']) === true) { + $user_defined = true; // Parameters received by user call. $graph_seconds = (!empty($other) && isset($other['data'][0])) ? $other['data'][0] : SECONDS_1HOUR; - // 1 hour by default. + + // Base64. $graph_threshold = (!empty($other) && isset($other['data'][1]) && $other['data'][1]) ? $other['data'][1] : 0; + // 1 hour by default. + $graph_threshold = (!empty($other) && isset($other['data'][2]) && $other['data'][2]) ? $other['data'][2] : 0; + // Graph height when send email by alert - $height = (!empty($other) && isset($other['data'][2]) && $other['data'][2]) ? $other['data'][2] : 225; + $height = (!empty($other) && isset($other['data'][3]) && $other['data'][3]) ? $other['data'][3] : 225; // Graph width (optional). - $width = (!empty($other) && isset($other['data'][3]) && $other['data'][3]) ? $other['data'][3] : ''; + $width = (!empty($other) && isset($other['data'][4]) && $other['data'][4]) ? $other['data'][4] : ''; } else { // Fixed parameters for _modulegraph_nh_. $graph_seconds = $other['data'];