From bdba4fa76214dc8c73e679f6da1d346d1e77b4b2 Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 2 Jul 2013 19:05:07 +0000 Subject: 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 --- usr/local/www/services_captiveportal_filemanager.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr/local/www') 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; } -- cgit v1.1