diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 5539400ecc..a052fbcfdf 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -1773,4 +1773,17 @@ function get_alias_list($type = null) {
return $result;
}
+/* returns an array consisting of every element of $haystack that is not equal to $needle. */
+function array_exclude($needle, $haystack) {
+ $result = array();
+ if (is_array($haystack)) {
+ foreach ($haystack as $thing) {
+ if ($needle !== $thing) {
+ $result[] = $thing;
+ }
+ }
+ }
+ return $result;
+}
+
?>
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index d72ec43dfe..e11d32e433 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -693,6 +693,7 @@ EOD;
diff --git a/usr/local/www/firewall_nat_1to1_edit.php b/usr/local/www/firewall_nat_1to1_edit.php
index 135d0e99fc..d6dc9af53e 100755
--- a/usr/local/www/firewall_nat_1to1_edit.php
+++ b/usr/local/www/firewall_nat_1to1_edit.php
@@ -467,33 +467,11 @@ function typesel_change() {
- "")
- foreach($config['aliases']['alias'] as $alias_name) {
- switch ($alias_name['type']) {
- case "host":
- case "network":
- case "openvpn":
- case "urltable":
- if($addrisfirst == 1) $aliasesaddr .= ",";
- $aliasesaddr .= "'" . $alias_name['name'] . "'";
- $addrisfirst = 1;
- break;
- default:
- break;
- }
- }
-?>