diff options
author | Florian Pritz <bluewind@xinu.at> | 2011-09-23 10:50:32 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2011-09-24 18:41:55 +0200 |
commit | ff1030375587ddcaec6585d20f5b66e05467c8f1 (patch) | |
tree | 21f1e85ce69868314677797d52e0f0c60acd023d /apps | |
parent | d928cd363689149e9f26b76d6671a4b40a8cc917 (diff) | |
download | nextcloud-server-ff1030375587ddcaec6585d20f5b66e05467c8f1.tar.gz nextcloud-server-ff1030375587ddcaec6585d20f5b66e05467c8f1.zip |
apps/calendar: change ctag after modifying event
edit() tried to do that, but it used $id which is the event id and not
the calendar id.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/calendar/lib/object.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/calendar/lib/object.php b/apps/calendar/lib/object.php index 98e17ac81b6..4b95f8c2ce3 100644 --- a/apps/calendar/lib/object.php +++ b/apps/calendar/lib/object.php @@ -115,7 +115,7 @@ class OC_Calendar_Object{ $stmt = OC_DB::prepare( 'UPDATE *PREFIX*calendar_objects SET objecttype=?,startdate=?,enddate=?,repeating=?,summary=?,calendardata=?, lastmodified = ? WHERE id = ?' ); $result = $stmt->execute(array($type,$startdate,$enddate,$repeating,$summary,$data,time(),$id)); - OC_Calendar_Calendar::touchCalendar($id); + OC_Calendar_Calendar::touchCalendar($oldobject['calendarid']); return true; } @@ -147,8 +147,10 @@ class OC_Calendar_Object{ * @return boolean */ public static function delete($id){ + $oldobject = self::find($id); $stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*calendar_objects WHERE id = ?' ); $stmt->execute(array($id)); + OC_Calendar_Calendar::touchCalendar($oldobject['calendarid']); return true; } |