summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0509a5c)
raw | patch | inline | side by side (parent: 0509a5c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 27 Sep 2006 03:54:18 +0000 (03:54 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 27 Sep 2006 03:54:18 +0000 (03:54 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4786 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_acl.inc | patch | blob | history |
diff --git a/include/class_acl.inc b/include/class_acl.inc
index 7bd9ba33f1c03eaa62b01d4b580be28d836e9bb2..dec421bec554a299818248ac8a34567b071c4ee5 100644 (file)
--- a/include/class_acl.inc
+++ b/include/class_acl.inc
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= "<input type='hidden' name='acl_dummy_0_0_0' value='1'>";
asort($plist);
/* Build general objects */
+
+ $list =$this->sort_by_priority($list);
foreach ($list as $key => $name){
/* Create sub acl if it does not exist */