From 386f7b9139d7ed002e94b3f14b3760acf9d1124c Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 4 Jan 2008 16:13:49 +0000 Subject: [PATCH] Removed unnessessary session write-backs git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8225 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_acl.inc | 2 +- gosa-core/include/class_userinfo.inc | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/gosa-core/include/class_acl.inc b/gosa-core/include/class_acl.inc index 07b84b3d3..91b89f79c 100644 --- a/gosa-core/include/class_acl.inc +++ b/gosa-core/include/class_acl.inc @@ -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); diff --git a/gosa-core/include/class_userinfo.inc b/gosa-core/include/class_userinfo.inc index de0d89715..b2b987dee 100644 --- a/gosa-core/include/class_userinfo.inc +++ b/gosa-core/include/class_userinfo.inc @@ -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); } -- 2.30.2