index 77015dad2290a8992a921968fd50cb3281efdf62..b2b987deeb30d867145773d93cf1e79f76c46579 100644 (file)
function get_permissions($dn, $object, $attribute= "", $skip_write= FALSE)
{
/* Push cache answer? */
- if (isset($_SESSION['ACL_CACHE']["$dn+$object+$attribute"])){
+ $ACL_CACHE = &session::get('ACL_CACHE');
+ if (isset($ACL_CACHE["$dn+$object+$attribute"])){
/* Remove write if needed */
if ($skip_write){
- $ret = preg_replace('/w/', '', $_SESSION['ACL_CACHE']["$dn+$object+$attribute"]);
+ $ret = preg_replace('/w/', '', $ACL_CACHE["$dn+$object+$attribute"]);
}else{
- $ret = $_SESSION['ACL_CACHE']["$dn+$object+$attribute"];
+ $ret = $ACL_CACHE["$dn+$object+$attribute"];
}
return($ret);
}
}
}
- $_SESSION['ACL_CACHE']["$dn+$object+$attribute"]= $ret;
+ $ACL_CACHE["$dn+$object+$attribute"]= $ret;
/* Remove write if needed */
if ($skip_write){
function get_module_departments($module)
{
/* Use cached results if possilbe */
- if(isset($_SESSION['ACL_CACHE']['MODULE_DEPARTMENTS'][serialize($module)])){
- return($_SESSION['ACL_CACHE']['MODULE_DEPARTMENTS'][serialize($module)]);
+ $ACL_CACHE = session::get('ACL_CACHE');
+ if(isset($ACL_CACHE['MODULE_DEPARTMENTS'][serialize($module)])){
+ return($ACL_CACHE['MODULE_DEPARTMENTS'][serialize($module)]);
}
global $plist;
}
}
- $_SESSION['ACL_CACHE']['MODULE_DEPARTMENTS'][serialize($module)] = $deps;
+ $ACL_CACHE = &session::get('ACL_CACHE');
+ $ACL_CACHE['MODULE_DEPARTMENTS'][serialize($module)] = $deps;
return ($deps);
}