From: hickert Date: Thu, 25 Oct 2007 06:47:51 +0000 (+0000) Subject: Fixed caching for values using the skip_write parameter. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=21d1a943852dce56f3c45ee580f5cf9309060d2a;p=gosa.git 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 --- 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); }