From 39a180eb665454db47e089573c33c26341952044 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 29 Aug 2011 17:30:48 +0000 Subject: [PATCH] 2011-08-29 Miguel de Dios * include/graphs/functions_fsgraph.php, include/graphs/fgraph.php: added $homeurl parameter to graph vertical column in flash. Fixes: #3398097 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4845 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/include/graphs/fgraph.php | 2 +- pandora_console/include/graphs/functions_fsgraph.php | 5 ++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 5618e82301..7235058308 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2011-08-29 Miguel de Dios + + * include/graphs/functions_fsgraph.php, include/graphs/fgraph.php: added + $homeurl parameter to graph vertical column in flash. + + Fixes: #3398097 + 2011-08-29 Dario Rodriguez * include/functions_graph.php: Fixed a bug setting graphic resolution diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index 9a1c4981b5..f7d4378564 100755 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -159,7 +159,7 @@ function vbar_graph($flash_chart, $chart_data, $width, $height, $color = array() $water_mark = '', $font = '', $font_size = '', $force_steps = true, $ttl = 1) { if($flash_chart) { - echo fs_2d_column_chart ($chart_data, $width, $height); + echo fs_2d_column_chart ($chart_data, $width, $height, $homedir); } else { $graph = array(); diff --git a/pandora_console/include/graphs/functions_fsgraph.php b/pandora_console/include/graphs/functions_fsgraph.php index c5bee76ed4..ccf8b38bde 100755 --- a/pandora_console/include/graphs/functions_fsgraph.php +++ b/pandora_console/include/graphs/functions_fsgraph.php @@ -520,7 +520,7 @@ function fs_2d_pie_chart ($data, $names, $width, $height, $background = "EEEEEE" } // Returns a 2D column chart -function fs_2d_column_chart ($data, $width, $height) { +function fs_2d_column_chart ($data, $width, $height, $homeurl = '') { if (sizeof ($data) == 0) { return; } @@ -540,7 +540,6 @@ function fs_2d_column_chart ($data, $width, $height) { $step = round($ndata/$xdata_display); - if(is_array(reset($data))) { $data2 = array(); $count = 0; @@ -591,7 +590,7 @@ function fs_2d_column_chart ($data, $width, $height) { . ($empty == 1 ? ';yAxisMinValue=0;yAxisMaxValue=1' : '')); // Return the code - return get_chart_code ($chart, $width, $height, 'include/graphs/FusionCharts/FCF_Column2D.swf'); + return get_chart_code ($chart, $width, $height, $homeurl . 'include/graphs/FusionCharts/FCF_Column2D.swf'); } // Returns a BAR Horizontalchart