modify hooks in OC_Calendar_Calendar

This commit is contained in:
Georg Ehrke 2012-06-11 15:16:59 +02:00
parent eb3605aa63
commit 5cb9d82b45

View file

@ -110,7 +110,7 @@ class OC_Calendar_Calendar{
$result = $stmt->execute(array($userid,$name,$uri,1,$order,$color,$timezone,$components));
$insertid = OCP\DB::insertid('*PREFIX*calendar_calendars');
OCP\Util::emitHook('OC_Calendar', 'addCalendar', array('calendar_id' => $insertid));
OCP\Util::emitHook('OC_Calendar', 'addCalendar', $insertid);
return $insertid;
}
@ -133,7 +133,7 @@ class OC_Calendar_Calendar{
$result = $stmt->execute(array($userid,$name,$uri,1,$order,$color,$timezone,$components));
$insertid = OCP\DB::insertid('*PREFIX*calendar_calendars');
OCP\Util::emitHook('OC_Calendar', 'addCalendar', array('calendar_id' => $insertid));
OCP\Util::emitHook('OC_Calendar', 'addCalendar', $insertid);
return $insertid;
}
@ -164,7 +164,7 @@ class OC_Calendar_Calendar{
$stmt = OCP\DB::prepare( 'UPDATE *PREFIX*calendar_calendars SET displayname=?,calendarorder=?,calendarcolor=?,timezone=?,components=?,ctag=ctag+1 WHERE id=?' );
$result = $stmt->execute(array($name,$order,$color,$timezone,$components,$id));
OCP\Util::emitHook('OC_Calendar', 'editCalendar', array('calendar_id' => $id));
OCP\Util::emitHook('OC_Calendar', 'editCalendar', $id);
return true;
}
@ -205,7 +205,7 @@ class OC_Calendar_Calendar{
$stmt = OCP\DB::prepare( 'DELETE FROM *PREFIX*calendar_objects WHERE calendarid = ?' );
$stmt->execute(array($id));
OCP\Util::emitHook('OC_Calendar', 'deleteCalendar', array('calendar_id' => $id));
OCP\Util::emitHook('OC_Calendar', 'deleteCalendar', $id);
return true;
}