Code

Updated functions.inc
[gosa.git] / gosa-core / include / class_pluglist.inc
index 87dcd769368812892d2e5496fbea44c3817a496a..6a68b8d43b2e4fcc1f1bac780c9cc14df7da4bb2 100644 (file)
@@ -79,26 +79,21 @@ class pluglist {
 
        function check_access($aclname)
        {
-               $deps= $this->ui->get_module_departments($aclname);
-
                $acls_to_check = array();
                if(preg_match("/,/",$aclname)){
                        $acls_to_check = split(",",$aclname);
                }else{
                        $acls_to_check = array($aclname);
                }
-       
-               if(preg_match("/\//",$aclname)){
+
+               foreach($acls_to_check as $acl_to_check){
+                       $deps = $this->ui->get_module_departments($acl_to_check);
                        foreach($deps as $dep){
-                               foreach($acls_to_check as $acl_to_check){
+                               if(preg_match("/\//",$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){
+                               }else{
                                        if($this->ui->get_category_permissions($dep,$acl_to_check) != ""){
                                                return(TRUE);
                                        }
@@ -149,8 +144,11 @@ class pluglist {
 
                                        /* Read information from class variable */
                                        if (!isset($info['CLASS'])){
-                                               msg_dialog::display(_("Configuration error"), _("The configuration format has changed. Please re-run setup!"), ERROR_DIALOG);
-                                               display_error_page();
+                                               msg_dialog::display(
+                                                               _("Configuration error"), 
+                                                               _("The configuration format has changed. Please re-run setup!"), 
+                                                               FATAL_ERROR_DIALOG);
+                                               exit();
                                        }
                                        if (!plugin_available($info['CLASS'])){
                                                continue;