From ed6ab5c8e5064714b8e79c1325596aa66c6ee49f Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Fri, 10 Aug 2012 09:04:52 +0000 Subject: [PATCH] 2012-08-10 Sergio Martin * include/functions_api.php: Force the static graphs in the last added function to api git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6856 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/include/functions_api.php | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 5e502a690e..f46d1e43d1 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-08-10 Sergio Martin + + * include/functions_api.php: Force the static graphs in the + last added function to api + 2012-08-10 Sergio Martin * include/functions_api.php: Add the missed function api_get_graph_module_data diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index f87e3d4ebc..8866463004 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -3793,6 +3793,9 @@ function api_get_graph_module_data($id, $thrash1, $other, $thrash2) { $homeurl = '../'; $ttl = 1; + global $config; + $config['flash_charts'] = 0; + $image = grafico_modulo_sparse ($id, $period, $draw_events, $width, $height , '',null, $draw_alerts, $avg_only, false, @@ -3803,7 +3806,7 @@ function api_get_graph_module_data($id, $thrash1, $other, $thrash2) { preg_match("/src='([^']*)'/i",$image, $match); if(empty($match[1])) { - echo "No data retrieved"; + echo "Error getting graph"; } else { header('Content-type: image/png');