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/vpn_pptp_users_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/vpn_pptp_users_edit.php')
-rwxr-xr-x | usr/local/www/vpn_pptp_users_edit.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/usr/local/www/vpn_pptp_users_edit.php b/usr/local/www/vpn_pptp_users_edit.php index b3299ca..07961da 100755 --- a/usr/local/www/vpn_pptp_users_edit.php +++ b/usr/local/www/vpn_pptp_users_edit.php @@ -36,6 +36,19 @@ ##|-PRIV +function pptpd_users_sort() { + global $g, $config; + + if (!is_array($config['ppptpd']['user'])) + return; + + function usercmp($a, $b) { + return strcasecmp($a['name'], $b['name']); + } + + usort($config['pptpd']['user'], "usercmp"); +} + require("guiconfig.inc"); if (!is_array($config['pptpd']['user'])) { @@ -103,6 +116,7 @@ if ($_POST) { if ($_POST['password']) $secretent['password'] = $_POST['password']; + pptpd_users_sort(); if (isset($id) && $a_secret[$id]) $a_secret[$id] = $secretent; else |