Ticket integria:3621 fixed image in mail #75

(cherry picked from commit 653da41402)
This commit is contained in:
daniel 2016-09-19 16:43:46 +02:00
parent e66a06aac6
commit dcb67e2207
1 changed files with 6 additions and 2 deletions

View File

@ -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' => '<img src="data:image/jpeg;base64,' . $graph_image_file_encoded . '">'));
if($other['data'] < 40000){
header('Content-type: text/html');
returnData('string', array('type' => 'string', 'data' => '<img src="data:image/jpeg;base64,' . $graph_image_file_encoded . '">'));
} 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));
}