aboutsummaryrefslogtreecommitdiffstats
path: root/config/freeswitch/freeswitch_extensions.tmp
diff options
context:
space:
mode:
Diffstat (limited to 'config/freeswitch/freeswitch_extensions.tmp')
-rw-r--r--config/freeswitch/freeswitch_extensions.tmp7
1 files changed, 5 insertions, 2 deletions
diff --git a/config/freeswitch/freeswitch_extensions.tmp b/config/freeswitch/freeswitch_extensions.tmp
index 8ef415fd..b1db2702 100644
--- a/config/freeswitch/freeswitch_extensions.tmp
+++ b/config/freeswitch/freeswitch_extensions.tmp
@@ -38,8 +38,11 @@ $a_extensions = &$config['installedpackages']['freeswitchextensions']['confi
if ($_GET['act'] == "del") {
if ($_GET['type'] == 'extensions') {
- if ($a_extensions[$_GET['id']]) {
- unlink("/usr/local/freeswitch/conf/directory/default/".$_GET['extension'].".xml");
+ if ($a_extensions[$_GET['id']]) {
+ $tmp_file_name = "/usr/local/freeswitch/conf/directory/default/".$_GET['extension'].".xml";
+ if (file_exists($tmp_file_name)) {
+ unlink($tmp_file_name);
+ }
unset($a_extensions[$_GET['id']]);
write_config();
header("Location: freeswitch_extensions.php");