forked from excaliburpartners/polycomphones
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.php
More file actions
23 lines (18 loc) · 794 Bytes
/
Copy pathuninstall.php
File metadata and controls
23 lines (18 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
if (!defined('FREEPBX_IS_AUTH')) { die('No direct script access allowed'); }
sql('DROP TABLE IF EXISTS polycom_settings, polycom_networks, polycom_network_settings,
polycom_devices, polycom_device_settings, polycom_device_lines, polycom_device_line_settings, polycom_device_attendants,
polycom_externallines, polycom_externalline_settings, polycom_alertinfo');
define("SOFTWARE_PATH", $amp_conf['AMPWEBROOT'] . '/admin/modules/_polycom_software/');
define("PROVISIONING_PATH", $amp_conf['AMPWEBROOT'] . "/polycom");
out('Removing symlink to web provisioner');
if(is_link(PROVISIONING_PATH)) {
unlink(PROVISIONING_PATH);
}
foreach(scandir(SOFTWARE_PATH) as $item)
{
if(is_file(SOFTWARE_PATH . $item) && is_link(SOFTWARE_PATH . $item)) {
unlink(SOFTWARE_PATH . $item);
}
}
?>