cleanup of notification on uninstall

git-svn-id: https://forge.glpi-project.org/svn/example/trunk@138 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
remicollet
2010-02-22 12:58:50 +00:00
parent c56d206aa5
commit f795f9e3f5
2 changed files with 9 additions and 0 deletions

View File

@ -656,6 +656,14 @@ function plugin_example_install() {
function plugin_example_uninstall() {
global $DB;
$notif = new Notification();
$options = array('itemtype' => 'Ticket',
'event' => 'plugin_example',
'FIELDS' => 'id');
foreach ($DB->request('glpi_notifications', $options) as $data) {
$notif->delete($data);
}
// Old version tables
if (TableExists("glpi_dropdown_plugin_example")) {
$query = "DROP TABLE `glpi_dropdown_plugin_example`";