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>
This commit is contained in:
Florian Pritz 2011-09-23 10:50:32 +02:00
parent d928cd3636
commit ff10303755
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}