New maps in progress... (List, create and edit mode)

This commit is contained in:
Arturo Gonzalez 2016-02-02 15:36:31 +01:00
parent 9cebc5ef12
commit a24670d961
2 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ function maps_get_subtype_string($subtype) {
function maps_duplicate_map($id) { function maps_duplicate_map($id) {
global $config; 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; $result = 0;
if (!empty($map)) { if (!empty($map)) {
$map_names = db_get_all_rows_sql("SELECT name FROM tmap WHERE name LIKE '" . $map['name'] . "%'"); $map_names = db_get_all_rows_sql("SELECT name FROM tmap WHERE name LIKE '" . $map['name'] . "%'");

View File

@ -156,13 +156,13 @@ else if ($delete_networkmap || $duplicate_networkmap || $update_networkmap) {
if ($delete_networkmap) { if ($delete_networkmap) {
$result_delete = maps_delete_map($id); $result_delete = maps_delete_map($id);
if ($result_delete) { if (!$result_delete) {
db_pandora_audit( "Networkmap management", db_pandora_audit( "Networkmap management",
"Delete networkmap #$id"); "Fail try to delete networkmap #$id");
} }
else { else {
db_pandora_audit( "Networkmap management", db_pandora_audit( "Networkmap management",
"Fail try to delete networkmap #$id"); "Delete networkmap #$id");
} }
ui_print_result_message ($result_delete, ui_print_result_message ($result_delete,