diff --git a/apps/calendar/lib/object.php b/apps/calendar/lib/object.php index 3d4174a57b..f0a9bf050f 100755 --- a/apps/calendar/lib/object.php +++ b/apps/calendar/lib/object.php @@ -105,10 +105,11 @@ class OC_Calendar_Object{ $stmt = OCP\DB::prepare( 'INSERT INTO *PREFIX*calendar_objects (calendarid,objecttype,startdate,enddate,repeating,summary,calendardata,uri,lastmodified) VALUES(?,?,?,?,?,?,?,?,?)' ); $stmt->execute(array($id,$type,$startdate,$enddate,$repeating,$summary,$data,$uri,time())); + $object_id = OCP\DB::insertid('*PREFIX*calendar_objects'); OC_Calendar_Calendar::touchCalendar($id); - return OCP\DB::insertid('*PREFIX*calendar_objects'); + return $object_id; } /** @@ -124,10 +125,11 @@ class OC_Calendar_Object{ $stmt = OCP\DB::prepare( 'INSERT INTO *PREFIX*calendar_objects (calendarid,objecttype,startdate,enddate,repeating,summary,calendardata,uri,lastmodified) VALUES(?,?,?,?,?,?,?,?,?)' ); $stmt->execute(array($id,$type,$startdate,$enddate,$repeating,$summary,$data,$uri,time())); + $object_id = OCP\DB::insertid('*PREFIX*calendar_objects'); OC_Calendar_Calendar::touchCalendar($id); - return OCP\DB::insertid('*PREFIX*calendar_objects'); + return $object_id; } /**