From 912fca454276710cb7a54548048ccca34034273f Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 30 Jun 2010 10:14:03 -0300 Subject: Reset firewall_ files --- usr/local/www/firewall_aliases.php | 22 +- usr/local/www/firewall_aliases_edit.php | 70 +++---- usr/local/www/firewall_aliases_import.php | 36 ++-- usr/local/www/firewall_nat.php | 28 +-- usr/local/www/firewall_nat_1to1.php | 28 +-- usr/local/www/firewall_nat_1to1_edit.php | 30 +-- usr/local/www/firewall_nat_edit.php | 198 +++++++++--------- usr/local/www/firewall_nat_out.php | 60 +++--- usr/local/www/firewall_nat_out_edit.php | 78 +++---- usr/local/www/firewall_rules.php | 130 ++++++------ usr/local/www/firewall_rules_edit.php | 300 +++++++++++++-------------- usr/local/www/firewall_schedule.php | 16 +- usr/local/www/firewall_schedule_edit.php | 74 +++---- usr/local/www/firewall_shaper.php | 26 +-- usr/local/www/firewall_shaper_layer7.php | 40 ++-- usr/local/www/firewall_shaper_queues.php | 14 +- usr/local/www/firewall_shaper_vinterface.php | 28 +-- usr/local/www/firewall_shaper_wizards.php | 8 +- usr/local/www/firewall_virtual_ip.php | 24 +-- usr/local/www/firewall_virtual_ip_edit.php | 70 +++---- 20 files changed, 640 insertions(+), 640 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/firewall_aliases.php b/usr/local/www/firewall_aliases.php index 1e69efd..bc210a1 100755 --- a/usr/local/www/firewall_aliases.php +++ b/usr/local/www/firewall_aliases.php @@ -147,7 +147,7 @@ if ($_GET['act'] == "del") { } } if($is_alias_referenced == true) { - $savemsg = sprintf(gettext("Cannot delete rule. Currently in use by %s"), $referenced_by); + $savemsg = "Cannot delete rule. Currently in use by {$referenced_by}"; } else { unset($a_aliases[$_GET['id']]); write_config(); @@ -169,19 +169,19 @@ include("head.inc");

-You must apply the changes in order for them to take effect.");?> +You must apply the changes in order for them to take effect.");?> - - - + + + @@ -213,8 +213,8 @@ include("head.inc"); @@ -227,10 +227,10 @@ include("head.inc"); +
NameValuesDescription - +
 ">
- - + +
">">
  - "> - " alt="" /> + " alt="" />
@@ -238,7 +238,7 @@ include("head.inc"); -

:

+

Note:
Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number of changes that have to be made if a host, network or port changes. You can enter the name of an alias instead of the host, network or port in all fields that have a red background. The alias will be resolved according to the list above. If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped.

diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index a7e50b6..dca3d12 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -44,7 +44,7 @@ ##|*MATCH=firewall_aliases_edit.php* ##|-PRIV -$pgtitle = array(gettext("Firewall"),gettext("Aliases"),gettext("Edit")); +$pgtitle = array("Firewall","Aliases","Edit"); // Keywords not allowed in names $reserved_keywords = array("pass", "out", "queue", "max", "min", "pptp", "pppoe", "l2tp", "openvpn"); @@ -101,7 +101,7 @@ if (isset($id) && $a_aliases[$id]) { $iflist = get_configured_interface_with_descr(true, true); foreach ($iflist as $if => $ifdesc) if($ifdesc == $pconfig['descr']) - $input_errors[] = sprintf(gettext("Sorry, an interface is already named %s."), $pconfig['descr']); + $input_errors[] = "Sorry, an interface is already named {$pconfig['descr']}."; if($a_aliases[$id]['type'] == "urltable") { $pconfig['address'] = $a_aliases[$id]['url']; @@ -130,24 +130,24 @@ if ($_POST) { /* input validation */ $reqdfields = explode(" ", "name"); - $reqdfieldsn = array(",", gettext("Name")); + $reqdfieldsn = explode(",", "Name"); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); $x = is_validaliasname($_POST['name']); if (!isset($x)) { - $input_errors[] = gettext("Reserved word used for alias name."); + $input_errors[] = "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.)"; + $input_errors[] = "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, _."); + $input_errors[] = "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) { if ($alias['name'] == $_POST['name']) { - $input_errors[] = gettext("An alias with this name already exists."); + $input_errors[] = "An alias with this name already exists."; break; } } @@ -156,12 +156,12 @@ if ($_POST) { /* Check for reserved keyword names */ foreach($reserved_keywords as $rk) if($rk == $_POST['name']) - $input_errors[] = sprintf(gettext("Cannot use a reserved keyword as alias name %s"), $rk); + $input_errors[] = "Cannot use a reserved keyword as alias name $rk"; /* check for name interface description conflicts */ foreach($config['interfaces'] as $interface) { if($interface['descr'] == $_POST['name']) { - $input_errors[] = gettext("An interface description with this name already exists."); + $input_errors[] = "An interface description with this name already exists."; break; } } @@ -183,10 +183,10 @@ if ($_POST) { $alias['url'] = $_POST['address0']; $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."); + $input_errors[] = "You must provide a valid URL."; $dont_update = true; } elseif (! process_alias_urltable($alias['name'], $alias['url'], 0, true)) { - $input_errors[] = gettext("Unable to fetch usable data."); + $input_errors[] = "Unable to fetch usable data."; $dont_update = true; } } @@ -231,14 +231,14 @@ if ($_POST) { } if($isfirst == 0) { /* nothing was found */ - $input_errors[] = gettext("You must provide a valid URL. Could not fetch usable data."); + $input_errors[] = "You must provide a valid URL. Could not fetch usable data."; $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."); + $input_errors[] = "You must provide a valid URL."; $dont_update = true; break; } @@ -254,12 +254,12 @@ if ($_POST) { $wrongaliases .= " " . $_POST["address{$x}"]; } else if ($_POST['type'] == "port") { if (!is_port($_POST["address{$x}"])) - $input_errors[] = $_POST["address{$x}"] . " " . gettext("is not a valid port or alias."); + $input_errors[] = $_POST["address{$x}"] . " is not a valid port or alias."; } else if ($_POST['type'] == "host" || $_POST['type'] == "network") { 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[] = $_POST["address{$x}"] . " is not a valid {$_POST['type']} alias."; } if (is_iprange($_POST["address{$x}"])) { list($startip, $endip) = explode('-', $_POST["address{$x}"]); @@ -274,11 +274,11 @@ if ($_POST) { if ($_POST["detail{$x}"] <> "") $final_address_details[] = $_POST["detail{$x}"]; else - $final_address_details[] = sprintf(gettext("Entry added %s"), date('r')); + $final_address_details[] = "Entry added " . date('r'); } } if ($wrongaliases <> "") - $input_errors[] = sprintf(gettext("The alias(es): %s \ncannot be nested cause they are not of the same type."), $wrongaliases); + $input_errors[] = "The alias(es): {$wrongaliases} \ncannot be nested cause they are not of the same type."; } if (!$input_errors) { @@ -444,8 +444,8 @@ $update_freq_str = gettext("Update Freq."); $networks_help = gettext("Networks are specified in CIDR format. Select the CIDR mask that pertains to each entry. /32 specifies a single host, /24 specifies 255.255.255.0, etc. Hostnames (FQDNs) may also be specified, using a /32 mask. You may also enter an IP range such as 192.168.1.1-192.168.1.254 and a list of CIDR networks will be derived to fill the range."); $hosts_help = gettext("Enter as many hosts as you would like. Hosts must be specified by their IP address."); $ports_help = gettext("Enter as many ports as you wish. Port ranges can be expressed by seperating with a colon."); -$url_help = sprintf(gettext("Enter as many URLs as you wish. After saving %s will download the URL and import the items into the alias. Use only with small sets of IP addresses (less than 3000)."), $g['product_name']); -$urltable_help = sprintf(gettext("Enter a single URL containing a large number of IPs and/or Subnets. After saving %s will download the URL and create a table file containing these addresses. This will work with large numbers of addresses (30,000+) or small numbers."), $g['product_name']); +$url_help = gettext("Enter as many URLs as you wish. After saving {$g['product_name']} will download the URL and import the items into the alias. Use only with small sets of IP addresses (less than 3000)."); +$urltable_help = gettext("Enter a single URL containing a large number of IPs and/or Subnets. After saving {$g['product_name']} will download the URL and create a table file containing these addresses. This will work with large numbers of addresses (30,000+) or small numbers."); $openvpn_str = gettext("Username"); $openvpn_user_str = gettext("OpenVPN Users"); @@ -549,10 +549,10 @@ EOD; - + - + - + - + @@ -595,13 +595,13 @@ EOD; - + - + " type="text" class="formfld unknown" id="detail" size="50" value="" />
Alias Edit
Name @@ -561,30 +561,30 @@ EOD;
- + The name of the alias may only consist of the characters a-z, A-Z and 0-9.
Description
- + You may enter a description here for your reference (not parsed).
Type
-
+
Item information
Network
CIDR
Description
- " /> +
  - " /> - " /> + +
diff --git a/usr/local/www/firewall_aliases_import.php b/usr/local/www/firewall_aliases_import.php index 47a22d0..760688d 100755 --- a/usr/local/www/firewall_aliases_import.php +++ b/usr/local/www/firewall_aliases_import.php @@ -37,7 +37,7 @@ ##|*MATCH=firewall_aliases_import.php* ##|-PRIV -$pgtitle = array(gettext("Firewall"),gettext("Aliases"),gettext("Bulk import")); +$pgtitle = array("Firewall","Aliases","Bulk import"); $reserved_keywords = array("pass", "out", "queue", "max", "min", "pptp"); @@ -55,27 +55,27 @@ $a_aliases = &$config['aliases']['alias']; if($_POST['aliasimport'] <> "") { $reqdfields = explode(" ", "name aliasimport"); - $reqdfieldsn = array(",", gettext("Name,Aliases")); + $reqdfieldsn = explode(",", "Name,Aliases"); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); if (is_validaliasname($_POST['name']) == false) - $input_errors[] = gettext("The alias name may only consist of the characters a-z, A-Z, 0-9, _."); + $input_errors[] = "The alias name may only consist of the characters a-z, A-Z, 0-9, _."; /* check for name duplicates */ if (is_alias($_POST['name'])) - $input_errors[] = gettext("An alias with this name already exists."); + $input_errors[] = "An alias with this name already exists."; /* Check for reserved keyword names */ foreach($reserved_keywords as $rk) if ($rk == $_POST['name']) - $input_errors[] = sprintf(gettext("Cannot use a reserved keyword as alias name %s"), $rk); + $input_errors[] = "Cannot use a reserved keyword as alias name $rk"; /* check for name interface description conflicts */ foreach($config['interfaces'] as $interface) { if($interface['descr'] == $_POST['name']) { - $input_errors[] = gettext("An interface description with this name already exists."); + $input_errors[] = "An interface description with this name already exists."; break; } } @@ -90,7 +90,7 @@ if($_POST['aliasimport'] <> "") { $rangesubnets = ip_range_to_subnet_array($startip, $endip); $address .= implode(" ", $rangesubnets); } else if (!is_ipaddr($impip) && !is_subnet($impip) && !empty($impip)) { - $input_errors[] = sprintf(gettext("%s is not an IP address. Please correct the error to continue"), $impip); + $input_errors[] = "$impip is not an IP address. Please correct the error to continue"; } elseif (!empty($impip)) { $imported[] = $impip; } @@ -127,31 +127,31 @@ include("head.inc");
- + - + + The name of the alias may only consist of the characters a-z, A-Z and 0-9. - + +
You may enter a description here + for your reference (not parsed). - + +
Paste in the aliases to import separated by a carriage return. Common examples are lists of IPs, networks, blacklists, etc. +
The list may contain only IP addresses.
Alias Import
Alias Name
-
Description -
.
Aliases to import -
-
  - " /> - " onclick="history.back()" /> + +
diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php index 55e73df..84fc0e8 100755 --- a/usr/local/www/firewall_nat.php +++ b/usr/local/www/firewall_nat.php @@ -158,7 +158,7 @@ if (isset($_POST['del_x'])) { } } -$pgtitle = array(gettext("Firewall","NAT","Port Forward")); +$pgtitle = array("Firewall","NAT","Port Forward"); include("head.inc"); echo ""; @@ -174,18 +174,18 @@ echo "

-gettext("You must apply the changes in order for them to take effect."));?>
+You must apply the changes in order for them to take effect.");?>
@@ -323,15 +323,15 @@ include("head.inc");

Note:
-
gettext("If advanced outbound NAT is enabled, no outbound NAT - rules will be automatically generated any longer.") gettext("Instead, only the mappings - you specify below will be used.") gettext("With advanced outbound NAT disabled, +
If advanced outbound NAT is enabled, no outbound NAT + rules will be automatically generated any longer. Instead, only the mappings + you specify below will be used. With advanced outbound NAT disabled, a mapping is automatically created for each interface's subnet - (except WAN).") gettext("If you use target addresses other than the WAN interface's + (except WAN). If you use target addresses other than the WAN interface's IP address, then depending on the way your WAN connection is setup, you - may also need a") gettext("Virtual IP").
+ may also need a Virtual IP.

- gettext("You may enter your own mappings below.")

+ You may enter your own mappings below.

@@ -339,20 +339,20 @@ include("head.inc");     - gettext("Interface") - gettext("Source") - gettext("Source Port") - gettext("Destination") - gettext("Destination Port") - gettext("NAT Address") - gettext("NAT Port") - gettext("Static Port") - gettext("Description") + Interface + Source + Source Port + Destination + Destination Port + NAT Address + NAT Port + Static Port + Description - +
@@ -437,7 +437,7 @@ include("head.inc"); - + @@ -447,11 +447,11 @@ include("head.inc"); - + - +
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php index 5b22a00..df0487f 100755 --- a/usr/local/www/firewall_nat_out_edit.php +++ b/usr/local/www/firewall_nat_out_edit.php @@ -108,51 +108,51 @@ if ($_POST) { $pconfig = $_POST; /* input validation */ - $reqdfields = explode(" ", gettext("interface protocol source source_subnet destination destination_subnet")); - $reqdfieldsn = explode(",", gettext("Interface,Protocol,Source,Source bit count,Destination,Destination bit count")); + $reqdfields = explode(" ", "interface protocol source source_subnet destination destination_subnet"); + $reqdfieldsn = explode(",", "Interface,Protocol,Source,Source bit count,Destination,Destination bit count"); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); if($_POST['sourceport'] <> "" && !is_port($_POST['sourceport'])) - $input_errors[] = gettext("You must supply either a valid port for the source port entry."); + $input_errors[] = "You must supply either a valid port for the source port entry."; if($_POST['dstport'] <> "" and !is_port($_POST['dstport'])) - $input_errors[] = gettext("You must supply either a valid port for the destination port entry."); + $input_errors[] = "You must supply either a valid port for the destination port entry."; if($_POST['natport'] <> "" and !is_port($_POST['natport'])) - $input_errors[] = gettext("You must supply either a valid port for the nat port entry."); + $input_errors[] = "You must supply either a valid port for the nat port entry."; if ($_POST['source_type'] != "any") { if ($_POST['source'] && !is_ipaddr($_POST['source']) && $_POST['source'] <> "any") { - $input_errors[] = gettext("A valid source must be specified."); + $input_errors[] = "A valid source must be specified."; } } if ($_POST['source_subnet'] && !is_numericint($_POST['source_subnet'])) { - $input_errors[] = gettext("A valid source bit count must be specified."); + $input_errors[] = "A valid source bit count must be specified."; } if ($_POST['sourceport'] && !is_numericint($_POST['sourceport'])) { - $input_errors[] = gettext("A valid source port must be specified."); + $input_errors[] = "A valid source port must be specified."; } if ($_POST['destination_type'] != "any") { if ($_POST['destination'] && !is_ipaddr($_POST['destination'])) { - $input_errors[] = gettext("A valid destination must be specified."); + $input_errors[] = "A valid destination must be specified."; } } if ($_POST['destination_subnet'] && !is_numericint($_POST['destination_subnet'])) { - $input_errors[] = gettext("A valid destination bit count must be specified."); + $input_errors[] = "A valid destination bit count must be specified."; } if ($_POST['destination_type'] == "any") { if ($_POST['destination_not']) { - $input_errors[] = gettext("Negating destination address of \"any\" is invalid."); + $input_errors[] = "Negating destination address of \"any\" is invalid."; } } if ($_POST['nonat'] && $_POST['staticnatport']) { - $input_errors[] = gettext("Static port cannot be used with No NAT."); + $input_errors[] = "Static port cannot be used with No NAT."; } if ($_POST['target'] && !is_ipaddr($_POST['target'])) { - $input_errors[] = gettext("A valid target IP address must be specified."); + $input_errors[] = "A valid target IP address must be specified."; } /* if user has selected any as source, set it here */ @@ -249,7 +249,7 @@ if ($_POST) { } } -$pgtitle = array(gettext("Firewall","NAT","Outbound","Edit")); +$pgtitle = array("Firewall","NAT","Outbound","Edit"); $closehead = false; include("head.inc"); @@ -304,14 +304,14 @@ function sourcesel_change() { - + + Enabling this option will disable NAT for traffic matching this rule and stop processing Outbound NAT rules. +
Hint: in most cases, you won't use this option.
@@ -325,8 +325,8 @@ function sourcesel_change() {
- gettext("Choose which interface this rule applies to.")
- gettext("Hint: in most cases, you'll want to use WAN here.")
+ Choose which interface this rule applies to.
+ Hint: in most cases, you'll want to use WAN here.
@@ -336,8 +336,8 @@ function sourcesel_change() { foreach ($protocols as $proto): ?> -
gettext("Choose which protocol this rule should match.")
- gettext("Hint: in most cases, you should specify any  here.")
+
Choose which protocol this rule should match.
+ Hint: in most cases, you should specify any  here.
@@ -355,13 +355,13 @@ function sourcesel_change() { - + @@ -371,11 +371,11 @@ blank for any)
gettext("Edit Advanced Outbound NAT entry")Edit Advanced Outbound NAT entry
Do not NAT > - gettext("Enabling this option will disable NAT for traffic matching this rule and stop processing Outbound NAT rules.") -
gettext("Hint: in most cases, you won't use this option.")
Interface
Protocol
Address:   /
 gettext("Enter the source network for the outbound NAT mapping.")Enter the source network for the outbound NAT mapping.
Source port:  
- gettext("Destination") + Destination > not
- gettext("Use this option to invert the sense of the match.")
+ Use this option to invert the sense of the match.

@@ -399,8 +399,8 @@ blank for any) - + @@ -411,13 +411,13 @@ any) - + - +
 gettext("Enter the destination network for - the outbound NAT mapping.")Enter the destination network for + the outbound NAT mapping.
Destination port:  
gettext("Translation")Translation @@ -451,7 +451,7 @@ any) @@ -461,18 +461,18 @@ any) - + - + +
You may enter a description here + for your reference (not parsed). diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php index 4809d2f..b9888e6 100755 --- a/usr/local/www/firewall_rules.php +++ b/usr/local/www/firewall_rules.php @@ -41,7 +41,7 @@ ##|*MATCH=firewall_rules.php* ##|-PRIV -$pgtitle = array(gettext("Firewall"),gettext("Rules")); +$pgtitle = array("Firewall", "Rules"); $statusurl = "status_filter_reload.php"; $logurl = "diag_logs_filter.php"; @@ -146,7 +146,7 @@ if ($_POST) { clear_subsystem_dirty('filter'); - $savemsg = gettext("The settings have been applied").". ".gettext("The firewall rules are now reloading in the background").". ".gettext("You can also ")."".gettext("monitor")."".gettext("the reload progress")."."; + $savemsg = "The settings have been applied. The firewall rules are now reloading in the background. You can also monitor the reload progress."; } } @@ -249,7 +249,7 @@ echo " name="srcnot" type="checkbox" id="srcnot" value="yes" > - + not
- + Use this option to invert the sense of the match.

Address:  
  - gettext("Packets matching this rule will be mapped to the IP address given here.")
- gettext("If you want this rule to apply to another IP address than the IP address of the interface chosen above, - select it here (you need to define Virtual IP addresses on the first)"). - gettext("Also note that if you are trying to redirect connections on the LAN select the "any" option.") + Packets matching this rule will be mapped to the IP address given here.
+ If you want this rule to apply to another IP address than the IP address of the interface chosen above, + select it here (you need to define Virtual IP addresses on the first). + Also note that if you are trying to redirect connections on the LAN select the "any" option.
  - gettext("Enter the source port for the outbound NAT mapping.") + Enter the source port for the outbound NAT mapping.
Static-port:  
gettext("No XMLRPC Sync")No XMLRPC Sync >
- gettext("HINT: This prevents the rule from automatically syncing to other CARP members.") + HINT: This prevents the rule from automatically syncing to other CARP members.
gettext("Description")Description -
gettext("You may enter a description here - for your reference (not parsed).")
 
- + - +
  Type:   name="srctype" class="formselect" onChange="typesel_change()"> - - - + + + - + - + - + $ifdesc): ?> - + @@ -781,7 +781,7 @@ include("head.inc");
  Address:   autocomplete='off' name="src" type="text" class="formfldalias" id="src" size="20" value=""> / name="srcmask" class="formselect" id="srcmask"> @@ -794,20 +794,20 @@ include("head.inc");

- type="button" onClick="show_source_port_range()" value="Advanced"> + type="button" onClick="show_source_port_range()" value="Advanced"> - Show source port range