diff options
author | Bill Marquette <billm@pfsense.org> | 2005-09-07 03:37:38 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-09-07 03:37:38 +0000 |
commit | 0df6adf8df8ed6b828167f8609e7d1de24018609 (patch) | |
tree | 07123b12f7fb7b5075a1fedeb86c5e3f0497e1b8 | |
parent | 3caa8aa1014d8728670a1dd328e6a2ee1bcb7f18 (diff) | |
download | pfsense-0df6adf8df8ed6b828167f8609e7d1de24018609.zip pfsense-0df6adf8df8ed6b828167f8609e7d1de24018609.tar.gz |
Correctly utilize true/false/other return values
-rwxr-xr-x | usr/local/www/firewall_aliases_edit.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index e744492..be37ec7 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -80,11 +80,12 @@ if ($_POST) { do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); - if (($_POST['name'] && (is_validaliasname($_POST['name']) == false))) { - $input_errors[] = "The alias name may only consist of the characters a-z, A-Z, 0-9."; - } - if (($_POST['name'] && (is_validaliasname($_POST['name']) == -2))) { - //$input_errors[] = "Reserved word used for alias name."; + $x = is_validaliasname($_POST['name']); + if (!isset($x)) { + $input_errors[] = "Reserved word used for alias name."; + } else { + if (is_validaliasname($_POST['name']) == false) + $input_errors[] = "The alias name may only consist of the characters a-z, A-Z, 0-9."; } if ($_POST['type'] == "host") if (!is_ipaddr($_POST['address'])) { |