diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-12-16 19:40:56 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-12-16 19:40:56 +0100 |
commit | d0b0ddffb8d058247d3e6e70b556c2f13b107aae (patch) | |
tree | 93ec1d2a29ee8e0f223ffa2b4626508a80c31c1f /lib/plugins | |
parent | 9f9e7398b7ee207cb24be001eab76dcb8a79d64f (diff) | |
download | rpg-d0b0ddffb8d058247d3e6e70b556c2f13b107aae.tar.gz rpg-d0b0ddffb8d058247d3e6e70b556c2f13b107aae.tar.bz2 |
ACL Manager: simpler but more logical sort in the rule table
darcs-hash:20081216184056-7ad00-117f88fa93ac0fba46f98100c9da4f375dd1308c.gz
Diffstat (limited to 'lib/plugins')
-rw-r--r-- | lib/plugins/acl/admin.php | 19 |
1 files changed, 1 insertions, 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,30 +497,13 @@ 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 * * @author Andreas Gohr <andi@splitbrain.org> |