diff options
Diffstat (limited to 'src/usr/local')
-rw-r--r-- | src/usr/local/www/firewall_aliases.php | 4 | ||||
-rwxr-xr-x | src/usr/local/www/firewall_aliases_edit.php | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/usr/local/www/firewall_aliases.php b/src/usr/local/www/firewall_aliases.php index 4f422dd..a07da68 100644 --- a/src/usr/local/www/firewall_aliases.php +++ b/src/usr/local/www/firewall_aliases.php @@ -132,6 +132,10 @@ if ($_GET['act'] == "del") { if ($is_alias_referenced == true) { $savemsg = sprintf(gettext("Cannot delete alias. Currently in use by %s"), htmlspecialchars($referenced_by)); } else { + if (preg_match("/urltable/i", $a_aliases[$_GET['id']]['type'])) { + // this is a URL table type alias, delete its file as well + unlink_if_exists("/var/db/aliastables/" . $a_aliases[$_GET['id']]['name'] . ".txt"); + } unset($a_aliases[$_GET['id']]); if (write_config()) { filter_configure(); diff --git a/src/usr/local/www/firewall_aliases_edit.php b/src/usr/local/www/firewall_aliases_edit.php index ae6acaf..d859a3f 100755 --- a/src/usr/local/www/firewall_aliases_edit.php +++ b/src/usr/local/www/firewall_aliases_edit.php @@ -225,7 +225,7 @@ if ($_POST) { $alias['updatefreq'] = $_POST['address_subnet0'] ? $_POST['address_subnet0'] : 7; if (!is_URL($alias['url']) || empty($alias['url'])) { $input_errors[] = gettext("You must provide a valid URL."); - } elseif (!process_alias_urltable($alias['name'], $alias['url'], 0, true)) { + } elseif (!process_alias_urltable($alias['name'], $alias['url'], 0, true, true)) { $input_errors[] = gettext("Unable to fetch usable data from URL") . " " . htmlspecialchars($alias['url']); } if ($_POST["detail0"] <> "") { |