diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 4e936f98ec..cbca21da18 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -8974,8 +8974,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)); }