Skip to content

Commit 7f8847a

Browse files
committed
Clean plugin uninstall residual data
1 parent 611f8b6 commit 7f8847a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

hook.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,8 @@ function plugin_example_uninstall()
619619
global $DB;
620620

621621
$config = new Config();
622-
$config->deleteConfigurationValues('plugin:Example', ['configuration' => false]);
622+
$my_config = array_keys(GlpiConfig::getConfigurationValues('plugin:Example'));
623+
$config->deleteConfigurationValues('plugin:Example', $my_config);
623624

624625
ProfileRight::deleteProfileRights([Example::$rightname]);
625626

@@ -655,6 +656,10 @@ function plugin_example_uninstall()
655656
$query = 'DROP TABLE `glpi_plugin_example_items_devicecameras`;';
656657
$DB->doQuery($query);
657658
}
659+
if ($DB->tableExists('glpi_plugin_example_examples')) {
660+
$query = 'DROP TABLE `glpi_plugin_example_examples`;';
661+
$DB->doQuery($query);
662+
}
658663

659664
return true;
660665
}

0 commit comments

Comments
 (0)