2009-10-20 Sancho Lerena <slerena@artica.es>

* include/fgraph.php, 
        include/functions_fsgraph.php: Solves a small problem with Flash graphs
        when pandora fms console install dir is "/".




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2036 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2009-10-19 11:28:14 +00:00
parent 04d255f7f8
commit f3b40ded71
3 changed files with 19 additions and 2 deletions

View File

@ -1,5 +1,9 @@
2009-10-20 Sancho Lerena <slerena@artica.es>
* include/fgraph.php,
include/functions_fsgraph.php: Solves a small problem with Flash graphs
when pandora fms console install dir is "/".
* include/functions_db.php: Fixed bug #2859919 (Transaction lock timeout).
* include/error*: Fixed a formatting error and added better error

View File

@ -1677,8 +1677,15 @@ if ($graphic_type) {
graphic_error ();
}
}
// For / url has problems rendering http://xxxx//include/FusionCharts/fussionCharts.js
// just make a substitution in / case
if ($config["homeurl"] == "/")
$pre_url = "";
else
$pre_url = $config["homeurl"];
?>
<script language="JavaScript" src="<?php echo $config['homeurl']?>/include/FusionCharts/FusionCharts.js"></script>
<script language="JavaScript" src="<?php echo $pre_url?>/include/FusionCharts/FusionCharts.js"></script>

View File

@ -182,7 +182,13 @@ function fs_module_chart ($data, $width, $height, $avg_only = 1, $step = 10, $ti
$div_id = 'chart_div_' . $random_number;
$chart_id = 'chart_' . $random_number;
$output = '<div id="' . $div_id. '" style="z-index:1;"></div>';
$output .= '<script language="JavaScript" src="' . $config['homeurl'] . '/include/FusionCharts/FusionCharts.js"></script>';
if ($config["homeurl"] == "/")
$pre_url = "";
else
$pre_url = $config["homeurl"];
$output .= '<script language="JavaScript" src="' . $pre_url . '/include/FusionCharts/FusionCharts.js"></script>';
$output .= '<script type="text/javascript">
<!--
function pie_' . $chart_id . ' () {