forked from yakamara/ycom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uninstall.php
26 lines (18 loc) · 910 Bytes
/
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
<?php
$sql = rex_sql::factory();
$sql->setQuery('DELETE FROM `'.rex::getTable('yform_table').'` WHERE table_name = "'.rex::getTable('ycom_user').'"');
$sql->setQuery('DELETE FROM `'.rex::getTable('yform_field').'` WHERE table_name = "'.rex::getTable('ycom_user').'"');
$sql->setQuery('DELETE FROM `'.rex::getTable('yform_history').'` WHERE table_name = "'.rex::getTable('ycom_user').'"');
rex_sql_table::get(rex::getTable('article'))
->removeColumn('ycom_auth_type')
->removeColumn('ycom_group_type')
->removeColumn('ycom_groups')
->alter();
rex_sql_table::get(rex::getTable('ycom_user'))
->drop();
if ($this->getPlugin('group')->isInstalled()) {
$this->getPlugin('group')->includeFile(__DIR__.'/plugins/group/uninstall.php');
}
if ($this->getPlugin('media_auth')->isInstalled()) {
$this->getPlugin('media_auth')->includeFile(__DIR__.'/plugins/media_auth/uninstall.php');
}