summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_aliases_edit.php
diff options
context:
space:
mode:
authorJeann <wjeann@gmail.com>2010-06-30 00:49:17 -0300
committerJeann <wjeann@gmail.com>2010-06-30 00:49:17 -0300
commit49031495b501e4477941fa6248fe94cc698f9dcd (patch)
treeaf29dcafe7ffa35de4cbc101cc7428bcc62b96a7 /usr/local/www/firewall_aliases_edit.php
parentb1bb23a0cbe6f4d96b1a554c1051014d24529ecb (diff)
downloadpfsense-49031495b501e4477941fa6248fe94cc698f9dcd.zip
pfsense-49031495b501e4477941fa6248fe94cc698f9dcd.tar.gz
Implemment gettext() calls
Diffstat (limited to 'usr/local/www/firewall_aliases_edit.php')
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index a7e50b6..e44229e 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -137,12 +137,15 @@ if ($_POST) {
$x = is_validaliasname($_POST['name']);
if (!isset($x)) {
$input_errors[] = gettext("Reserved word used for alias name.");
- } else if ($_POST['type'] == "port" && (getservbyname($_POST['name'], "tcp") || getservbyname($_POST['name'], "udp"))) {
- $input_errors[] = gettext("Reserved word used for alias name.)";
- } else {
- if (is_validaliasname($_POST['name']) == false)
+ }
+ else if ($_POST['type'] == "port" && (getservbyname($_POST['name'], "tcp") || getservbyname($_POST['name'], "udp")))
+ {
+ $input_errors[] = gettext("Reserved word used for alias name.");
+ }
+ else {
+ if (is_validaliasname($_POST['name']) == false)
$input_errors[] = gettext("The alias name may only consist of the characters a-z, A-Z, 0-9, _.");
- }
+ }
/* check for name conflicts */
if (empty($a_aliases[$id])) {
foreach ($a_aliases as $alias) {
@@ -259,7 +262,7 @@ if ($_POST) {
if (!is_ipaddr($_POST["address{$x}"])
&& !is_hostname($_POST["address{$x}"])
&& !is_iprange($_POST["address{$x}"]))
- $input_errors[] = sprintf(gettext("%s is not a valid %s alias."), $_POST["address{$x}"], $_POST['type'];
+ $input_errors[] = sprintf(gettext("%s is not a valid %s alias."), $_POST["address{$x}"], $_POST['type']);
}
if (is_iprange($_POST["address{$x}"])) {
list($startip, $endip) = explode('-', $_POST["address{$x}"]);
OpenPOWER on IntegriCloud