Merge branch 'changes-in-ntwrkmap-dev' into 'develop'

Added nodes regeneration in map group updates

See merge request !388
This commit is contained in:
vgilc 2017-04-20 13:28:55 +02:00
commit 11b7212380
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;
}