Clean components when removing plugin (server)

This commit is contained in:
fbsanchez 2021-06-16 19:39:25 +02:00
parent 452d5d0b73
commit d2710b2e66
1 changed files with 6 additions and 0 deletions

View File

@ -94,6 +94,12 @@ function plugins_delete_plugin(int $id_plugin)
$result = $problem;
}
// Remove all components related to this plugin.
db_process_sql_delete(
'tnetwork_component',
[ 'id_plugin' => $id_plugin ]
);
if (is_metaconsole() === true && is_management_allowed() === true) {
$sc = new Synchronizer();
$problems = $sc->apply(