From dcb67e2207f29cc81f72a667abc8bac92c96c404 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 19 Sep 2016 16:43:46 +0200 Subject: [PATCH] Ticket integria:3621 fixed image in mail #75 (cherry picked from commit 653da41402c00359ed204296fe18bfd0c7b78013) --- pandora_console/include/functions_api.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 1d73c8844b..72c3f00696 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -8937,8 +8937,12 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4) { // returnError('error_module_graph', __('')); } else { - header('Content-type: text/html'); - returnData('string', array('type' => 'string', 'data' => '')); + if($other['data'] < 40000){ + header('Content-type: text/html'); + returnData('string', array('type' => 'string', 'data' => '')); + } else { + returnData('string', array('type' => 'string', 'data' => $graph_image_file_encoded)); + } // To show only the base64 code, call returnData as: // returnData('string', array('type' => 'string', 'data' => $graph_image_file_encoded)); }