diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index f239dc3203..0051bfe834 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,7 @@ +2011-12-30 Vanessa Gil + * godmode/netflow/nf_edit.php + godmode/netflow/nf_item_list.php: Cascade delete filters. + 2011-12-29 Sergio Martin * godmode/agentes/module_manager_editor.php: Fixe module editor when the diff --git a/pandora_console/godmode/netflow/nf_edit.php b/pandora_console/godmode/netflow/nf_edit.php index 970c99fc86..c34e577f8d 100644 --- a/pandora_console/godmode/netflow/nf_edit.php +++ b/pandora_console/godmode/netflow/nf_edit.php @@ -43,11 +43,18 @@ $id = (int) get_parameter ('id'); $name = (string) get_parameter ('name'); if ($delete) { + $id_filter = db_get_value('id_name', 'tnetflow_filter', 'id_sg', $id); $result = db_process_sql_delete ('tnetflow_filter', array ('id_sg' => $id)); + + $result2 = db_process_sql_delete ('tnetflow_report_content', + array ('id_filter' => $id_filter)); - if ($result !== false) $result = true; - else $result = false; + if ($result !== false) { + $result = true; + } else { + $result = false; + } ui_print_result_message ($result, __('Successfully deleted'), @@ -61,8 +68,12 @@ if ($multiple_delete) { db_process_sql_begin(); foreach ($ids as $id) { + $id_filter = db_get_value('id_name', 'tnetflow_filter', 'id_sg', $id); $result = db_process_sql_delete ('tnetflow_filter', array ('id_sg' => $id)); + + $result2 = db_process_sql_delete ('tnetflow_report_content', + array ('id_filter' => $id_filter)); if ($result === false) { db_process_sql_rollback(); diff --git a/pandora_console/godmode/netflow/nf_item_list.php b/pandora_console/godmode/netflow/nf_item_list.php index 22719425f9..13c0619891 100644 --- a/pandora_console/godmode/netflow/nf_item_list.php +++ b/pandora_console/godmode/netflow/nf_item_list.php @@ -161,7 +161,7 @@ if(isset($data)) { echo ""; echo ""; }else { - echo "
".__('There are no defined filters')."
"; + echo "
".__('There are no defined items')."
"; } echo '
';