Merge branch 'ent-11335-se-pueden-crear-mapas-de-red-con-el-mismo-nombre-y-grupo' into 'develop'
Ent 11335 Se pueden crear mapas de red con el mismo nombre y grupo See merge request artica/pandorafms!6143
This commit is contained in:
commit
0e6531b983
|
@ -256,6 +256,18 @@ if ($new_networkmap || $save_networkmap) {
|
||||||
|
|
||||||
$name = (string) get_parameter('name');
|
$name = (string) get_parameter('name');
|
||||||
|
|
||||||
|
$exist = db_get_row_filter(
|
||||||
|
'tmap',
|
||||||
|
[
|
||||||
|
'name' => $name,
|
||||||
|
'id_group_map' => $id_group_map,
|
||||||
|
],
|
||||||
|
);
|
||||||
|
hd('Entraaaa', true);
|
||||||
|
hd($exist, true);
|
||||||
|
if ($exist !== false) {
|
||||||
|
$result_txt = ui_print_error_message(__('Another network map already exists with this name and group.'));
|
||||||
|
} else {
|
||||||
// Default size values.
|
// Default size values.
|
||||||
$width = $config['networkmap_max_width'];
|
$width = $config['networkmap_max_width'];
|
||||||
$height = $config['networkmap_max_width'];
|
$height = $config['networkmap_max_width'];
|
||||||
|
@ -404,6 +416,7 @@ if ($new_networkmap || $save_networkmap) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// The networkmap exists
|
// The networkmap exists
|
||||||
else if ($update_networkmap || $copy_networkmap || $delete) {
|
else if ($update_networkmap || $copy_networkmap || $delete) {
|
||||||
|
@ -464,7 +477,17 @@ else if ($update_networkmap || $copy_networkmap || $delete) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$name = (string) get_parameter('name', '');
|
$name = (string) get_parameter('name', '');
|
||||||
|
$exist = db_get_row_filter(
|
||||||
|
'tmap',
|
||||||
|
[
|
||||||
|
'name' => $name,
|
||||||
|
'id_group_map' => $id_group_map,
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($exist !== false) {
|
||||||
|
$result_txt = ui_print_error_message(__('Another network map already exists with this name and group.'));
|
||||||
|
} else {
|
||||||
$recon_task_id = (int) get_parameter(
|
$recon_task_id = (int) get_parameter(
|
||||||
'recon_task_id',
|
'recon_task_id',
|
||||||
0
|
0
|
||||||
|
@ -530,6 +553,7 @@ else if ($update_networkmap || $copy_networkmap || $delete) {
|
||||||
$networkmap_manage = $networkmap_manage_new;
|
$networkmap_manage = $networkmap_manage_new;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($copy_networkmap) {
|
if ($copy_networkmap) {
|
||||||
$id = (int) get_parameter('id_networkmap', 0);
|
$id = (int) get_parameter('id_networkmap', 0);
|
||||||
|
|
Loading…
Reference in New Issue