diff --git a/infolog/inc/class.infolog_bo.inc.php b/infolog/inc/class.infolog_bo.inc.php index 7e7796a187..c0526d3e91 100644 --- a/infolog/inc/class.infolog_bo.inc.php +++ b/infolog/inc/class.infolog_bo.inc.php @@ -297,17 +297,18 @@ class infolog_bo { static $cache = array(); + $info_id = is_array($info) ? $info['info_id'] : $info; + if (!$user) $user = $this->user; if ($user == $this->user) { $grants = $this->grants; - $access =& $cache[$info_id][$required_rights]; // we only cache the current user! + if ($info_id) $access =& $cache[$info_id][$required_rights]; // we only cache the current user! } else { $grants = $GLOBALS['egw']->acl->get_grants('infolog',$this->group_owners ? $this->group_owners : true,$user); } - if (!$info) { $owner = $other ? $other : $user; @@ -315,7 +316,6 @@ class infolog_bo return $grant & $required_rights; } - $info_id = is_array($info) ? $info['info_id'] : $info; if (!isset($access)) { diff --git a/infolog/inc/class.infolog_so.inc.php b/infolog/inc/class.infolog_so.inc.php index 76b6a55c55..a8f6227b7f 100644 --- a/infolog/inc/class.infolog_so.inc.php +++ b/infolog/inc/class.infolog_so.inc.php @@ -88,7 +88,7 @@ class infolog_so if (!$user) $user = $this->user; static $um_cache = array(); - $user_and_memberships =& $um_cache[$user]; + if ($user == $this->user) $user_and_memberships =& $um_cache[$user]; if (!isset($user_and_memberships)) { $user_and_memberships = $GLOBALS['egw']->accounts->memberships($user,true); @@ -120,7 +120,7 @@ class infolog_so { // dont change our own internal data, $backup_data = $this->data; - $info = $this->read((array)$info); + $info = $this->read(array('info_id'=>$info)); $this->data = $backup_data; } else @@ -132,7 +132,6 @@ class infolog_so return False; } $owner = $info['info_owner']; - $access_ok = $owner == $user || // user has all rights // ACL only on public entrys || $owner granted _PRIVATE (!!($grants[$owner] & $required_rights) ||