diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-05-05 22:32:55 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-05-05 22:32:55 +0200 |
commit | d854e4a1447b5f18bdac24fcf0456cae0e5b2737 (patch) | |
tree | b28c195e167979f897562aaad57b45e6ad6f3740 /apps/calendar | |
parent | f991948a714dd555befa46964113c460afc24cee (diff) | |
download | nextcloud-server-d854e4a1447b5f18bdac24fcf0456cae0e5b2737.tar.gz nextcloud-server-d854e4a1447b5f18bdac24fcf0456cae0e5b2737.zip |
Calendar: fix return of insert id
Diffstat (limited to 'apps/calendar')
-rwxr-xr-x | apps/calendar/lib/object.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/calendar/lib/object.php b/apps/calendar/lib/object.php index 3d4174a57be..f0a9bf050fc 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; } /** |