From e5fe7ff0debd9ba0fa9ec9b3a3f3b49e7acf2392 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 29 Sep 2016 16:55:25 +0200 Subject: [PATCH] if we write infolog entry with $ignore_acl===true, we also need to read it that way and allow to set info_id on creating infolog entry --- infolog/inc/class.infolog_bo.inc.php | 6 +++--- infolog/inc/class.infolog_so.inc.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/infolog/inc/class.infolog_bo.inc.php b/infolog/inc/class.infolog_bo.inc.php index ed92ddec9d..dd96a0a1c6 100644 --- a/infolog/inc/class.infolog_bo.inc.php +++ b/infolog/inc/class.infolog_bo.inc.php @@ -729,7 +729,7 @@ class infolog_bo // we need to get the old values to update the links in customfields and for the tracking if ($values['info_id']) { - $old = $this->read($values['info_id'], false, 'server'); + $old = $this->read($values['info_id'], false, 'server', $ignore_acl); } if (($status_only = $values['info_id'] && !$this->check_access($values,Acl::EDIT))) @@ -936,7 +936,7 @@ class infolog_bo { if (!isset($values['info_type']) || $status_only || empty($values['caldav_url'])) { - $values = $this->read($info_id, true, 'server'); + $values = $this->read($info_id, true, 'server', $ignore_acl); } $values['info_id'] = $info_id; @@ -1004,7 +1004,7 @@ class infolog_bo // Update modified timestamp of parent if($values['info_id_parent']) { - $parent = $this->read($values['info_id_parent'], false, 'server',true); + $parent = $this->read($values['info_id_parent'], false, 'server', true); $this->write($parent,false, true, false, true); } } diff --git a/infolog/inc/class.infolog_so.inc.php b/infolog/inc/class.infolog_so.inc.php index ca1d3219c8..d487e2e30d 100644 --- a/infolog/inc/class.infolog_so.inc.php +++ b/infolog/inc/class.infolog_so.inc.php @@ -547,7 +547,7 @@ class infolog_so { $where = array('info_id' => $info_id); if ($check_modified) $where['info_datemodified'] = $check_modified; - if (!$this->db->update($this->info_table,$to_write,$where,__LINE__,__FILE__)) + if (!$this->db->insert($this->info_table,$to_write,$where,__LINE__,__FILE__)) { //error_log("### soinfolog::write(".print_r($to_write,true).") where=".print_r($where,true)." returning false"); return false; // Error