diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index a1dfe6c27c..1224467b1a 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -292,22 +292,12 @@ sub pandora_purgedb ($$) { # Delete pending modules log_message ('PURGE', "Deleting pending delete modules (data table).", ''); - my @deleted_modules = get_db_rows ($dbh, 'SELECT id_agente_modulo FROM tagente_modulo WHERE delete_pending = 1'); - my @all_modules = get_db_rows ($dbh, 'SELECT id_agente_modulo, parent_module_id FROM tagente_modulo'); foreach my $module (@deleted_modules) { my $buffer = 1000; my $id_module = $module->{'id_agente_modulo'}; - - foreach my $m (@all_modules) { - my $id_parent = $m->{'parent_module_id'}; - my $id_module_fetched = $m->{'id_agente_modulo'}; - if ($id_parent == $id_module) { - db_do ($dbh, 'UPDATE tagente_modulo SET parent_module_id=0 WHERE id_agente_modulo=?', $id_module_fetched); - } - } - + log_message ('', "."); while(1) {