Code

Removed unnessessary session write-backs
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 4 Jan 2008 16:13:49 +0000 (16:13 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 4 Jan 2008 16:13:49 +0000 (16:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8225 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_acl.inc
gosa-core/include/class_userinfo.inc

index 07b84b3d34ce9b1ba4393ad704fba2d9e4f9d7be..91b89f79ce25a8034518fe2aed6818c99371e70a 100644 (file)
@@ -798,7 +798,7 @@ class acl extends plugin
         break;
       
       default:
-        print_red(sprintf(_("Unkown ACL type '%s'. Don't know how to handle it."), $type));
+        msg_dialog::display(_("Internal error"), sprintf(_("Unkown ACL type '%s'. Don't know how to handle it."), $type), ERROR_DIALOG);
         $a= array();
     }
     return ($a);
index de0d89715c2a9209eef6a6e2d74a08abee6f88a6..b2b987deeb30d867145773d93cf1e79f76c46579 100644 (file)
@@ -190,7 +190,7 @@ class userinfo
   function get_permissions($dn, $object, $attribute= "", $skip_write= FALSE)
   {
     /* Push cache answer? */
-    $ACL_CACHE = session::get('ACL_CACHE');
+    $ACL_CACHE = &session::get('ACL_CACHE');
     if (isset($ACL_CACHE["$dn+$object+$attribute"])){
 
       /* Remove write if needed */
@@ -274,9 +274,7 @@ class userinfo
       }
     }
 
-    $ACL_CACHE = session::get('ACL_CACHE');
     $ACL_CACHE["$dn+$object+$attribute"]= $ret;
-    session::set('ACL_CACHE',$ACL_CACHE);
 
     /* Remove write if needed */
     if ($skip_write){
@@ -388,9 +386,8 @@ class userinfo
       }
     }
 
-    $ACL_CACHE = session::get('ACL_CACHE');
+    $ACL_CACHE = &session::get('ACL_CACHE');
     $ACL_CACHE['MODULE_DEPARTMENTS'][serialize($module)] = $deps;
-    session::set('ACL_CACHE',$ACL_CACHE);
     return ($deps);
   }