diff options
Diffstat (limited to 'usr/local/www/services_wol_edit.php')
-rwxr-xr-x | usr/local/www/services_wol_edit.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/local/www/services_wol_edit.php b/usr/local/www/services_wol_edit.php index de0b3cd..30f710b 100755 --- a/usr/local/www/services_wol_edit.php +++ b/usr/local/www/services_wol_edit.php @@ -36,6 +36,15 @@ ##|*MATCH=services_wol_edit.php* ##|-PRIV +function wol_sort() { + global $g, $config; + + function wolcmp($a, $b) { + return strcmp($a['descr'], $b['descr']); + } + + usort($config['wol']['wolentry'], "wolcmp"); +} require("guiconfig.inc"); @@ -85,6 +94,7 @@ if ($_POST) { $wolent['mac'] = $_POST['mac']; $wolent['descr'] = $_POST['descr']; + wol_sort(); if (isset($id) && $a_wol[$id]) $a_wol[$id] = $wolent; else |