diff options
Diffstat (limited to 'usr/local/www/services_captiveportal_mac_edit.php')
-rwxr-xr-x | usr/local/www/services_captiveportal_mac_edit.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/local/www/services_captiveportal_mac_edit.php b/usr/local/www/services_captiveportal_mac_edit.php index 0b6b329..c4e138f 100755 --- a/usr/local/www/services_captiveportal_mac_edit.php +++ b/usr/local/www/services_captiveportal_mac_edit.php @@ -35,6 +35,15 @@ ##|*MATCH=services_captiveportal_mac_edit.php* ##|-PRIV +function passthrumacs_sort() { + global $g, $config; + + function passthrumacscmp($a, $b) { + return strcmp($a['mac'], $b['mac']); + } + + usort($config['captiveportal']['passthrumac'],"passthrumacscmp"); +} $pgtitle = array("Services","Captive portal","Edit pass-through MAC address"); require("guiconfig.inc"); @@ -86,6 +95,7 @@ if ($_POST) { $mac['mac'] = $_POST['mac']; $mac['descr'] = $_POST['descr']; + passthrumacs_sort(); if (isset($id) && $a_passthrumacs[$id]) $a_passthrumacs[$id] = $mac; else |