From 7cbeade191bfb4812c80fc40b72f1cd144d82b8f Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 2 Apr 2013 16:22:47 -0300 Subject: [PATCH] Preserve all URLs when one of them is invalid --- usr/local/www/firewall_aliases_edit.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index bbc4ee976a..b455b4fe20 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -238,16 +238,18 @@ if ($_POST) { } if($isfirst == 0) { /* nothing was found */ - $input_errors[] = gettext("You must provide a valid URL. Could not fetch usable data."); + $input_errors[] = sprintf(gettext("You must provide a valid URL. Could not fetch usable data from '%s'."), $_POST['address' . $x]); $dont_update = true; - break; } $alias['aliasurl'][] = $_POST['address' . $x]; mwexec("/bin/rm -rf {$temp_filename}"); } else { - $input_errors[] = gettext("You must provide a valid URL."); + $address[] = $_POST['address' . $x]; + $alias['aliasurl'][] = $_POST['address' . $x]; + if ($_POST["detail{$x}"] <> "") + $final_address_details[] = $_POST["detail{$x}"]; + $input_errors[] = sprintf(gettext("URL '%s' is not valid."), $_POST['address' . $x]); $dont_update = true; - break; } } }