Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-09-23 12:50:32 +0400
committerFlorian Pritz <bluewind@xinu.at>2011-09-24 20:41:55 +0400
commitff1030375587ddcaec6585d20f5b66e05467c8f1 (patch)
tree21f1e85ce69868314677797d52e0f0c60acd023d /apps/calendar
parentd928cd363689149e9f26b76d6671a4b40a8cc917 (diff)
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/calendar')
-rw-r--r--apps/calendar/lib/object.php4
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;
}