From 21d1a943852dce56f3c45ee580f5cf9309060d2a Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 25 Oct 2007 06:47:51 +0000 Subject: [PATCH] Fixed caching for values using the skip_write parameter. MyAccount plugins wasn't accessible anymore. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7649 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_userinfo.inc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/include/class_userinfo.inc b/include/class_userinfo.inc index c479e9332..097c7ccdc 100644 --- a/include/class_userinfo.inc +++ b/include/class_userinfo.inc @@ -191,7 +191,14 @@ class userinfo { /* Push cache answer? */ if (isset($_SESSION['ACL_CACHE']["$dn+$object+$attribute"])){ - return ($_SESSION['ACL_CACHE']["$dn+$object+$attribute"]); + + /* Remove write if needed */ + if ($skip_write){ + $ret = preg_replace('/w/', '', $_SESSION['ACL_CACHE']["$dn+$object+$attribute"]); + }else{ + $ret = $_SESSION['ACL_CACHE']["$dn+$object+$attribute"]; + } + return($ret); } $acl= array("r" => "", "w" => "", "c" => "", "d" => "", "m" => "", "a" => ""); @@ -266,12 +273,12 @@ class userinfo } } + $_SESSION['ACL_CACHE']["$dn+$object+$attribute"]= $ret; + /* Remove write if needed */ if ($skip_write){ $ret= preg_replace('/w/', '', $ret); } - - $_SESSION['ACL_CACHE']["$dn+$object+$attribute"]= $ret; return ($ret); } -- 2.30.2