diff --git a/pandora_console/include/functions_maps.php b/pandora_console/include/functions_maps.php index b56fbb403b..654930265d 100644 --- a/pandora_console/include/functions_maps.php +++ b/pandora_console/include/functions_maps.php @@ -51,7 +51,7 @@ function maps_get_subtype_string($subtype) { function maps_duplicate_map($id) { global $config; - $map = db_get_sql("SELECT * FROM tmap WHERE id_map = " . $id); + $map = db_get_sql("SELECT * FROM tmap WHERE id = " . $id); $result = 0; if (!empty($map)) { $map_names = db_get_all_rows_sql("SELECT name FROM tmap WHERE name LIKE '" . $map['name'] . "%'"); diff --git a/pandora_console/operation/maps/networkmap_list.php b/pandora_console/operation/maps/networkmap_list.php index 3dbf0d0d71..1a54ac42f6 100644 --- a/pandora_console/operation/maps/networkmap_list.php +++ b/pandora_console/operation/maps/networkmap_list.php @@ -156,13 +156,13 @@ else if ($delete_networkmap || $duplicate_networkmap || $update_networkmap) { if ($delete_networkmap) { $result_delete = maps_delete_map($id); - if ($result_delete) { + if (!$result_delete) { db_pandora_audit( "Networkmap management", - "Delete networkmap #$id"); + "Fail try to delete networkmap #$id"); } else { db_pandora_audit( "Networkmap management", - "Fail try to delete networkmap #$id"); + "Delete networkmap #$id"); } ui_print_result_message ($result_delete,