add update event for calendar model event
authorMichael Spahn <m.spahn@metaways.de>
Fri, 14 Jul 2017 11:43:49 +0000 (13:43 +0200)
committerMichael Spahn <m.spahn@metaways.de>
Fri, 14 Jul 2017 11:59:46 +0000 (13:59 +0200)
Change-Id: I6a2df7ecf6889c2c1898ed5d8b0832afbe81dd44
Reviewed-on: http://gerrit.tine20.com/customers/5170
Reviewed-by: Michael Spahn <m.spahn@metaways.de>
Tested-by: Michael Spahn <m.spahn@metaways.de>
tine20/Calendar/Controller/Event.php
tine20/Calendar/Event/EventUpdateEvent.php [new file with mode: 0644]

index 0885847..f62f9cd 100644 (file)
@@ -909,7 +909,11 @@ class Calendar_Controller_Event extends Tinebase_Controller_Record_Abstract impl
                             . " Skipping free/busy check because event has not been rescheduled and no new attender has been added");
                     }
                 }
-                
+
+                $eventUpdateEvent = new Calendar_Event_EventUpdateEvent();
+                $eventUpdateEvent->observable = $_record;
+                Tinebase_Record_PersistentObserver::getInstance()->fireEvent($eventUpdateEvent);
+
                 parent::update($_record);
                 
             } else if ($_record->attendee instanceof Tinebase_Record_RecordSet) {
diff --git a/tine20/Calendar/Event/EventUpdateEvent.php b/tine20/Calendar/Event/EventUpdateEvent.php
new file mode 100644 (file)
index 0000000..5b418bb
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Tine 2.0
+ *
+ * @package     Calendar
+ * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
+ * @copyright   Copyright (c) 2017 Metaways Infosystems GmbH (http://www.metaways.de)
+ * @author      Michael Spahn <m.spahn@metaways.de>
+ */
+
+/**
+ * Class Calendar_Event_EventUpdateEvent
+ */
+class Calendar_Event_EventUpdateEvent extends Tinebase_Event_Observer_Abstract
+{
+}
\ No newline at end of file