2010-07-13 Darío Rodríguez <dario.rodriguez@artica.es>

* godmode/reporting/graph_builder.php: Fixed problem when creating or
	updating a graph with empty name.
	Fixes: #3026943



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2999 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
darode 2010-07-13 09:31:30 +00:00
parent 766b3073f3
commit 346ed80344
2 changed files with 18 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2010-07-13 Darío Rodríguez <dario.rodriguez@artica.es>
* godmode/reporting/graph_builder.php: Fixed problem when creating or
updating a graph with empty name.
Fixes: #3026943
2010-07-13 Sergio Martin <sergio.martin@artica.es>
* include/functions_visual_map.php

View File

@ -81,9 +81,13 @@ if ($add_graph) {
'period' => $period, 'width' => $width, 'height' => $height,
'private' => 0, 'id_group' => $idGroup, 'events' => $events,
'stacked' => $stacked);
$id_graph = process_sql_insert('tgraph', $values);
if (trim($name) != "") {
$id_graph = process_sql_insert('tgraph', $values);
} else {
$id_graph = false;
}
if(!$id_graph)
$edit_graph = false;
}
@ -100,9 +104,14 @@ if ($update_graph) {
$events = get_parameter('events');
$alerts = get_parameter('alerts');
if (trim($name) != "") {
$success = process_sql_update('tgraph',
array('name' => $name, 'id_group' => $id_group, 'description' => $description, 'width' => $width, 'height' => $height, 'period' => $period, 'stacked' => $stacked, 'events' => $events),
array('id_graph' => $id));
} else {
$success = false;
}
}
function add_quotes($item)