diff options
author | Ermal <eri@pfsense.org> | 2013-07-02 19:05:07 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-07-02 19:05:07 +0000 |
commit | bdba4fa76214dc8c73e679f6da1d346d1e77b4b2 (patch) | |
tree | dd561402737dee8f13cb5a6f9f80d4ab15d6b27e /usr | |
parent | 97752da5426af63b168f3af71090f034c08c7374 (diff) | |
download | pfsense-bdba4fa76214dc8c73e679f6da1d346d1e77b4b2.zip pfsense-bdba4fa76214dc8c73e679f6da1d346d1e77b4b2.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')
-rwxr-xr-x | usr/local/www/services_captiveportal_filemanager.php | 6 |
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; } |