Added nodes regeneration in map group updates

This commit is contained in:
Arturo Gonzalez 2017-04-20 13:18:55 +02:00
parent 868f84f3c4
commit 4c07fe5d3f
2 changed files with 8 additions and 0 deletions

View File

@ -27,6 +27,10 @@ function networkmap_delete_networkmap($id = 0) {
return $result;
}
function networkmap_delete_nodes($id_map) {
return db_process_sql_delete('titem', array('id_map' => $id_map));
}
function networkmap_process_networkmap($id = 0) {
global $config;

View File

@ -248,6 +248,10 @@ else if ($update_networkmap || $copy_networkmap || $delete) {
true);
if ($result) {
// If change the group, the map must be regenerated
if ($id_group != $id_group_old) {
networkmap_delete_nodes($id);
}
$networkmap_write = $networkmap_write_new;
$networkmap_manage = $networkmap_manage_new;
}