2013-06-12 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_reporting.php: fixed the empty serialize vars.
	
	Fixes: #2276

	MERGED FROM THE BRANCH PANDORA_4.0




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8307 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-06-12 16:36:46 +00:00
parent bfe5a49028
commit b4dc1d57e1
1 changed files with 10 additions and 4 deletions

View File

@ -2311,15 +2311,21 @@ function graph_custom_sql_graph ($id, $width, $height, $type = 'sql_graph_vbar',
$count = 0;
foreach ($data_result as $data_item) {
$count++;
$value = 0;
if (!empty($data_item["value"])) {
$value = $data_item["value"];
}
$label = __('Data');
if (!empty($data_item["label"])) {
$label = $data_item["label"];
}
switch ($type) {
case 'sql_graph_vbar': // vertical bar
$data[$data_item["label"]]['g'] = $data_item["value"];
break;
case 'sql_graph_hbar': // horizontal bar
$data[$data_item["label"]]['g'] = $data_item["value"];
$data[$label]['g'] = $value;
break;
case 'sql_graph_pie': // Pie
$data[$data_item["label"]] = $data_item["value"];
$data[$label] = $value;
break;
}
}