Leave table deletion to FreePBX
FreePBX and Director remove all tables that it has installed. If they do not exist, uninstaller gives errors
This commit is contained in:
parent
09db30fe9f
commit
9ac0d59c66
|
@ -95,21 +95,15 @@ if (!empty($version)) {
|
|||
sql("DELETE FROM kvstore WHERE module = 'sccpsettings'");
|
||||
sql("DELETE FROM kvstore WHERE module = 'Sccp_manager'");
|
||||
}
|
||||
}
|
||||
outn("<li>" . _('Removing all Sccp_manager tables') . "</li>");
|
||||
foreach ($sqlTables as $table) {
|
||||
$sql = "DROP TABLE IF EXISTS {$table}";
|
||||
$result = $db->query($sql);
|
||||
if (DB::IsError($result)) {
|
||||
die_freepbx($result->getDebugInfo());
|
||||
}
|
||||
$sql = "DROP VIEW IF EXISTS sccpdeviceconfig";
|
||||
$result = $db->query($sql);
|
||||
if (DB::IsError($result)) {
|
||||
die_freepbx($result->getDebugInfo());
|
||||
}
|
||||
unset($result);
|
||||
}
|
||||
// FreePbx removes all tables via module.xml, and uninstaller will error
|
||||
// If the tables do not exist.
|
||||
//outn("<li>" . _('Removing all Sccp_manager tables') . "</li>");
|
||||
//foreach ($sqlTables as $table) {
|
||||
//$sql = "DROP TABLE IF EXISTS {$table}";
|
||||
//}
|
||||
outn("<li>" . _('Removing all Sccp_manager views') . "</li>");
|
||||
$db->query("DROP VIEW IF EXISTS sccpdeviceconfig");
|
||||
|
||||
outn("<li>" . _("Uninstall Complete") . "</li>");
|
||||
return true;
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue