X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_acl.inc;h=dec421bec554a299818248ac8a34567b071c4ee5;hb=2c7972420c32a603e35ac5454fde6fd40b31259d;hp=7bd9ba33f1c03eaa62b01d4b580be28d836e9bb2;hpb=e8e3c0cd95f2bf59cd18112164bd20aeeca3bd69;p=gosa.git diff --git a/include/class_acl.inc b/include/class_acl.inc index 7bd9ba33f..dec421bec 100644 --- a/include/class_acl.inc +++ b/include/class_acl.inc @@ -473,7 +473,28 @@ class acl extends plugin return ($smarty->fetch (get_template_path('acl.tpl'))); } - + function sort_by_priority($list) + { + $tmp= get_global('plist'); + $plist= $tmp->info; + asort($plist); + + foreach($list as $name => $translation){ + $na = preg_replace("/^.*\//","",$name); + $prio= $plist[$na]['plPriority'] ; + + $newSort[$name] = $prio; + } + + asort($newSort); + + $ret = array(); + foreach($newSort as $name => $prio){ + $ret[$name] = $list[$name]; + } + return($ret); + } + function buildAclSelector($list) { $display= ""; @@ -483,6 +504,8 @@ class acl extends plugin asort($plist); /* Build general objects */ + + $list =$this->sort_by_priority($list); foreach ($list as $key => $name){ /* Create sub acl if it does not exist */