From 7ebb83b77225babf4dda904477bd165374adaedc Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 6 Feb 2013 10:17:36 +0000 Subject: [PATCH] optional parameter to ignore acl on read --- infolog/inc/class.infolog_bo.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/infolog/inc/class.infolog_bo.inc.php b/infolog/inc/class.infolog_bo.inc.php index de7334ee4c..20d8c2bd2d 100644 --- a/infolog/inc/class.infolog_bo.inc.php +++ b/infolog/inc/class.infolog_bo.inc.php @@ -567,10 +567,11 @@ class infolog_bo * need to be set to false if called from link-title to prevent an infinit recursion * @param string $date_format='ts' date-formats: 'ts'=timestamp, 'server'=timestamp in server-time, * 'array'=array or string with date-format + * @param boolean $ignore_acl=false if true, do NOT check access, default false * * @return array|boolean infolog entry, null if not found or false if no permission to read it */ - function &read($info_id,$run_link_id2from=true,$date_format='ts') + function &read($info_id,$run_link_id2from=true,$date_format='ts',$ignore_acl=false) { //error_log(__METHOD__.'('.array2string($info_id).', '.array2string($run_link_id2from).", '$date_format') ".function_backtrace()); if (is_scalar($info_id) || isset($info_id[count($info_id)-1])) @@ -591,7 +592,7 @@ class infolog_bo } $info_id = $data['info_id']; // in case the uid was specified - if (!$this->check_access($data,EGW_ACL_READ)) // check behind read, to prevent a double read + if (!$ignore_acl && !$this->check_access($data,EGW_ACL_READ)) // check behind read, to prevent a double read { return False; }