forked from raum2projekt/multinewsletter
-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathuninstall.php
26 lines (24 loc) · 1.01 KB
/
uninstall.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
$sql = rex_sql::factory();
// Delete tables
$sql->setQuery('DROP TABLE IF EXISTS `' . rex::getTablePrefix() . '375_archive`');
$sql->setQuery('DROP TABLE IF EXISTS `' . rex::getTablePrefix() . '375_group`');
$sql->setQuery('DROP TABLE IF EXISTS `' . rex::getTablePrefix() . '375_user`');
$sql->setQuery('DROP TABLE IF EXISTS `' . rex::getTablePrefix() . '375_sendlist`');
// Remove CronJobs
if (!class_exists(FriendsOfRedaxo\MultiNewsletter\CronjobSender::class)) {
// Load class in case addon is deactivated
require_once 'lib/CronjobSender.php';
}
$cronjob_sender = FriendsOfRedaxo\MultiNewsletter\CronjobSender::factory();
if ($cronjob_sender->isInstalled()) {
$cronjob_sender->delete();
}
if (!class_exists(FriendsOfRedaxo\MultiNewsletter\CronjobCleanup::class)) {
// Load class in case addon is deactivated
require_once 'lib/CronjobCleanup.php';
}
$cronjob_cleanup = FriendsOfRedaxo\MultiNewsletter\CronjobCleanup::factory();
if ($cronjob_cleanup->isInstalled()) {
$cronjob_cleanup->delete();
}