summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal_filemanager.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-07-02 19:05:07 +0000
committerErmal <eri@pfsense.org>2013-07-02 19:05:29 +0000
commit92465c6fc85589298c8f97bf29c9b2ac179a474e (patch)
tree25bdb38e09636ca53228a5626f52ce729335da2b /usr/local/www/services_captiveportal_filemanager.php
parent6c2bb4e62b7c55396d35559adf7c644a079e352b (diff)
downloadpfsense-92465c6fc85589298c8f97bf29c9b2ac179a474e.zip
pfsense-92465c6fc85589298c8f97bf29c9b2ac179a474e.tar.gz
Correct variable used to delete symlinks and files delete from CP filemanager. Reported-by: http://forum.pfsense.org/index.php/topic,64016.0/topicseen.html. While here reduce some uneeded extra operations
Diffstat (limited to 'usr/local/www/services_captiveportal_filemanager.php')
-rwxr-xr-xusr/local/www/services_captiveportal_filemanager.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/local/www/services_captiveportal_filemanager.php b/usr/local/www/services_captiveportal_filemanager.php
index aedd191..2c673a0 100755
--- a/usr/local/www/services_captiveportal_filemanager.php
+++ b/usr/local/www/services_captiveportal_filemanager.php
@@ -123,11 +123,11 @@ if ($_POST) {
}
} else if (($_GET['act'] == "del") && !empty($cpzone) && $a_element[$_GET['id']]) {
conf_mount_rw();
- unlink_if_exists($g['captiveportal_path'] . "/" . $a_element[$id]['name']);
+ @unlink("{$g['captiveportal_element_path']}/" . $a_element[$_GET['id']]['name']);
+ @unlink("{$g['captiveportal_path']}/" . $a_element[$_GET['id']]['name']);
+ conf_mount_ro();
unset($a_element[$_GET['id']]);
write_config();
- captiveportal_write_elements();
- conf_mount_ro();
header("Location: services_captiveportal_filemanager.php?zone={$cpzone}");
exit;
}
OpenPOWER on IntegriCloud