From d0b0ddffb8d058247d3e6e70b556c2f13b107aae Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 16 Dec 2008 19:40:56 +0100 Subject: ACL Manager: simpler but more logical sort in the rule table darcs-hash:20081216184056-7ad00-117f88fa93ac0fba46f98100c9da4f375dd1308c.gz --- lib/plugins/acl/admin.php | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 7378cafdd..4d072f4e3 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -497,29 +497,12 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { $usersgroups = array_unique($usersgroups); sort($usersgroups); - uksort($acl_config,array($this,'_sort_names')); + ksort($acl_config); $this->acl = $acl_config; $this->usersgroups = $usersgroups; } - /** - * Custom function to sort the ACLs by namespace names - * - * @todo This maybe could be improved to resemble the real tree structure? - */ - function _sort_names($a,$b){ - $ca = substr_count($a,':'); - $cb = substr_count($b,':'); - if($ca < $cb){ - return -1; - }elseif($ca > $cb){ - return 1; - }else{ - return strcmp($a,$b); - } - } - /** * Display all currently set permissions in a table * -- cgit v1.2.3