diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-06-30 18:15:14 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-06-30 18:16:09 +0000 |
commit | 0d64af597505a0e9c21d48669aafc8e1448b102b (patch) | |
tree | dc7101c26d46efc532af66aaaadf7825bd8e8bf2 /usr/local/www/services_captiveportal_ip_edit.php | |
parent | d44d94c5c51c7bd7c6de810abfe0c3266cf947b1 (diff) | |
download | pfsense-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/services_captiveportal_ip_edit.php')
-rwxr-xr-x | usr/local/www/services_captiveportal_ip_edit.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/local/www/services_captiveportal_ip_edit.php b/usr/local/www/services_captiveportal_ip_edit.php index 9efc033..19e2595 100755 --- a/usr/local/www/services_captiveportal_ip_edit.php +++ b/usr/local/www/services_captiveportal_ip_edit.php @@ -35,6 +35,15 @@ ##|*MATCH=services_captiveportal_ip_edit.php* ##|-PRIV +function allowedips_sort() { + global $g, $config; + + function allowedipscmp($a, $b) { + return strcmp($a['ip'], $b['ip']); + } + + usort($config['captiveportal']['allowedip'],"allowedipscmp"); +} $pgtitle = array("Services","Captive portal","Edit allowed IP address"); require("guiconfig.inc"); @@ -86,6 +95,7 @@ if ($_POST) { $ip['descr'] = $_POST['descr']; $ip['dir'] = $_POST['dir']; + allowedips_sort(); if (isset($id) && $a_allowedips[$id]) $a_allowedips[$id] = $ip; else |