From bcde9f940e538d71e8aadea0ec2e1419c263d4e5 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 5 Mar 2021 11:17:50 +0100 Subject: [PATCH] b64 --- pandora_console/include/functions_api.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 4a14cd1e56..5038f05328 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -13773,7 +13773,7 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4) $graph_seconds = (!empty($other) && isset($other['data'][0])) ? $other['data'][0] : SECONDS_1HOUR; // Base64. - $graph_threshold = (!empty($other) && isset($other['data'][1]) && $other['data'][1]) ? $other['data'][1] : 0; + $base64 = $other['data'][1]; // 1 hour by default. $graph_threshold = (!empty($other) && isset($other['data'][2]) && $other['data'][2]) ? $other['data'][2] : 0; @@ -13787,7 +13787,7 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4) // Fixed parameters for _modulegraph_nh_. $graph_seconds = $other['data']; $graph_threshold = 0; - $other['data'][1] = 0; + $base64 = 0; $height = 225; $width = '90%'; } @@ -13823,7 +13823,7 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4) $graph_html = grafico_modulo_sparse($params); - if ($other['data'][1]) { + if ($base64) { header('Content-type: text/html'); returnData('string', ['type' => 'string', 'data' => '']); } else {