diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b6d6627fbd..ca3a12d3d1 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2008-06-17 Esteban Sanchez + + * godmode/reporting/reporting_builder.php: Changing the group of a + report is not allowed. It will imply removing all the report contents + that belongs to an agent of the group. Fixed an error on javascript + changing the group. + 2008-06-17 Esteban Sanchez * ajax.php: Added to repository. AJAX interface for Pandora. A new diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index cb4092ba21..a8172831c7 100644 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -170,10 +170,10 @@ if ($create_report) { // Update report if ($update_report) { $sql = sprintf ('UPDATE treport SET name = "%s", - description = "%s", private = %d, id_group = %d + description = "%s", private = %d WHERE id_report = %d', $report_name, $report_description, - $report_private, $report_id_group, $id_report); + $report_private, $id_report); $result = mysql_query ($sql); if ($result) echo "

".lang_string ('modify_ok')."

"; @@ -320,9 +320,14 @@ if ($edit_sla_report_content) { $table->data[0][0] = lang_string ('report_name'); $table->data[0][1] = print_input_text ('report_name', $report_name, '', 35, 150, true); $table->data[1][0] = lang_string ('group'); - $table->data[1][1] = print_select_from_sql ('SELECT id_grupo, nombre FROM tgrupo ORDER BY nombre', - 'report_id_group', $report_id_group, '', '--', 0, true); - $table->data[1][1] .= ''; + if ($report_id_group) { + /* Changing the group is not allowed. */ + $table->data[1][1] = dame_grupo ($report_id_group); + } else { + $table->data[1][1] = print_select_from_sql ('SELECT id_grupo, nombre FROM tgrupo ORDER BY nombre', + 'report_id_group', $report_id_group, '', '--', 0, true); + } + $table->data[1][1] .= ' '; if ($report_id_group) { $table->data[1][1] .= ''; } @@ -618,7 +623,7 @@ function group_changed () { $(document).ready (function () { $('#id_agent').change (agent_changed); $('#type').change (report_type_changed); - $('#id_group').change (group_changed); + $('#report_id_group').change (group_changed); });