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
|
@ -96,20 +96,14 @@ if (!empty($version)) {
|
||||||
sql("DELETE FROM kvstore WHERE module = 'Sccp_manager'");
|
sql("DELETE FROM kvstore WHERE module = 'Sccp_manager'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outn("<li>" . _('Removing all Sccp_manager tables') . "</li>");
|
// FreePbx removes all tables via module.xml, and uninstaller will error
|
||||||
foreach ($sqlTables as $table) {
|
// If the tables do not exist.
|
||||||
$sql = "DROP TABLE IF EXISTS {$table}";
|
//outn("<li>" . _('Removing all Sccp_manager tables') . "</li>");
|
||||||
$result = $db->query($sql);
|
//foreach ($sqlTables as $table) {
|
||||||
if (DB::IsError($result)) {
|
//$sql = "DROP TABLE IF EXISTS {$table}";
|
||||||
die_freepbx($result->getDebugInfo());
|
//}
|
||||||
}
|
outn("<li>" . _('Removing all Sccp_manager views') . "</li>");
|
||||||
$sql = "DROP VIEW IF EXISTS sccpdeviceconfig";
|
$db->query("DROP VIEW IF EXISTS sccpdeviceconfig");
|
||||||
$result = $db->query($sql);
|
|
||||||
if (DB::IsError($result)) {
|
|
||||||
die_freepbx($result->getDebugInfo());
|
|
||||||
}
|
|
||||||
unset($result);
|
|
||||||
}
|
|
||||||
outn("<li>" . _("Uninstall Complete") . "</li>");
|
outn("<li>" . _("Uninstall Complete") . "</li>");
|
||||||
return true;
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue