From b177e77389d7862cdc422050dd0f063c3adb8480 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 7 Apr 2022 13:57:49 +0200 Subject: [PATCH] addEvent() returns new event --- inc/inc.ClassCalendar.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassCalendar.php b/inc/inc.ClassCalendar.php index 32af407c1..63face820 100644 --- a/inc/inc.ClassCalendar.php +++ b/inc/inc.ClassCalendar.php @@ -73,7 +73,12 @@ class SeedDMS_Calendar { "(".$this->db->qstr($name).", ".$this->db->qstr($comment).", ".(int) $from.", ".(int) $to.", ".$this->db->getCurrentTimestamp().", ".$this->user->getID().")"; $ret = $this->db->getResult($queryStr); - return $ret; + if (!$ret) + return false; + + $event = $this->getEvent((int) $this->db->getInsertID('tblEvents')); + + return $event; } /* }}} */ public function getEvent($id) { /* {{{ */