From 474fc1fc578f3a0f7c3fef85a531d84a45afe00e Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Mon, 27 Apr 2026 18:17:29 +0200 Subject: [PATCH] Notiz model: possible to add specific insertvon --- application/models/person/Notiz_model.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/application/models/person/Notiz_model.php b/application/models/person/Notiz_model.php index 64fce8944..6a7533a8f 100644 --- a/application/models/person/Notiz_model.php +++ b/application/models/person/Notiz_model.php @@ -98,7 +98,7 @@ class Notiz_model extends DB_Model /** * Add a Notiz for a given person */ - public function addNotizForPerson($person_id, $titel, $text, $erledigt, $verfasser_uid) + public function addNotizForPerson($person_id, $titel, $text, $erledigt, $verfasser_uid, $insertvon = null) { // Loads model Notizzuordnung_model $this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel'); @@ -106,8 +106,15 @@ class Notiz_model extends DB_Model // Start DB transaction $this->db->trans_start(false); - $result = $this->insert(array('titel' => $titel, 'text' => $text, 'erledigt' => $erledigt, 'verfasser_uid' => $verfasser_uid, - "insertvon" => $verfasser_uid)); + $result = $this->insert( + array( + 'titel' => $titel, + 'text' => $text, + 'erledigt' => $erledigt, + 'verfasser_uid' => $verfasser_uid, + 'insertvon' => $insertvon ?? $verfasser_uid + ) + ); if (isSuccess($result)) {