summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_nat_1to1_edit.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-06-30 18:15:14 +0000
committerErmal Luçi <eri@pfsense.org>2009-06-30 18:16:09 +0000
commit0d64af597505a0e9c21d48669aafc8e1448b102b (patch)
treedc7101c26d46efc532af66aaaadf7825bd8e8bf2 /usr/local/www/firewall_nat_1to1_edit.php
parentd44d94c5c51c7bd7c6de810abfe0c3266cf947b1 (diff)
downloadpfsense-0d64af597505a0e9c21d48669aafc8e1448b102b.zip
pfsense-0d64af597505a0e9c21d48669aafc8e1448b102b.tar.gz
Clear guiconfig from all sort junk functions and put them on the specific pages where they are needed.
Remove some sort functions not used.
Diffstat (limited to 'usr/local/www/firewall_nat_1to1_edit.php')
-rwxr-xr-xusr/local/www/firewall_nat_1to1_edit.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/local/www/firewall_nat_1to1_edit.php b/usr/local/www/firewall_nat_1to1_edit.php
index dee8b27..466e451 100755
--- a/usr/local/www/firewall_nat_1to1_edit.php
+++ b/usr/local/www/firewall_nat_1to1_edit.php
@@ -36,6 +36,18 @@
##|*MATCH=firewall_nat_1to1_edit.php*
##|-PRIV
+function nat_1to1_rules_sort() {
+ global $g, $config;
+
+ if (!is_array($config['nat']['onetoone']))
+ return;
+
+ function nat1to1cmp($a, $b) {
+ return ipcmp($a['external'], $b['external']);
+ }
+
+ usort($config['nat']['onetoone'], "nat1to1cmp");
+}
require("guiconfig.inc");
@@ -123,6 +135,7 @@ if ($_POST) {
$natent['descr'] = $_POST['descr'];
$natent['interface'] = $_POST['interface'];
+ nat_1to1_rules_sort();
if (isset($id) && $a_1to1[$id])
$a_1to1[$id] = $natent;
else
OpenPOWER on IntegriCloud