Code

Updated menu creation
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 18 Sep 2007 07:04:15 +0000 (07:04 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 18 Sep 2007 07:04:15 +0000 (07:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7314 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_pluglist.inc

index fd6fac1548084fe369ed5db1a36adccd8727d6ce..1327a6350c4517e37dba3e75388edbbabebc563c 100644 (file)
@@ -79,7 +79,6 @@ class pluglist {
 
        function check_access($aclname)
        {
-               $acl = "";
                $deps = $this->ui->get_module_departments($aclname);
 
                $acls_to_check = array();
@@ -92,19 +91,20 @@ class pluglist {
                if(preg_match("/\//",$aclname)){
                        foreach($deps as $dep){
                                foreach($acls_to_check as $acl_to_check){
-                                       $acl.=$this->ui->get_permissions($dep,$acl_to_check);
+                                       if($this->ui->get_permissions($dep,$acl_to_check) != ""){
+                                               return(TRUE);
+                                       }
                                }
                        }
                }else{
                        foreach($deps as $dep){
                                foreach($acls_to_check as $acl_to_check){
-                                       $acl.=$this->ui->get_category_permissions($dep,$acl_to_check);
+                                       if($this->ui->get_category_permissions($dep,$acl_to_check) != ""){
+                                               return(TRUE);
+                                       }
                                }
                        }
                }
-               if($acl != ""){
-                       return (TRUE);
-               }
                return (FALSE);
        }