make events inspectable on attendee status updates
authorCornelius Weiß <c.weiss@metaways.de>
Fri, 7 Jul 2017 08:55:17 +0000 (10:55 +0200)
committersstamer <s.stamer@metaways.de>
Fri, 7 Jul 2017 12:21:51 +0000 (14:21 +0200)
Change-Id: Ic01517cc67f80bd182fd7a8635d57cb716630189
Reviewed-on: http://gerrit.tine20.com/customers/5055
Reviewed-by: sstamer <s.stamer@metaways.de>
Tested-by: sstamer <s.stamer@metaways.de>
tine20/Calendar/Controller/Event.php

index a0c1f0c..92a0ca3 100644 (file)
@@ -2469,13 +2469,20 @@ class Calendar_Controller_Event extends Tinebase_Controller_Record_Abstract impl
                 
                 Tinebase_Alarm::getInstance()->setAlarmsOfRecord($_event);
             }
+
+            $event->attendee->removeRecord($currentAttender);
+            $event->attendee->addRecord($updatedAttender);
             
             $this->_increaseDisplayContainerContentSequence($updatedAttender, $event);
 
+            Tinebase_Record_PersistentObserver::getInstance()->fireEvent(new Calendar_Event_InspectEvent(array(
+                'observable' => $event
+            )));
+
             if ($currentAttender->status != $updatedAttender->status) {
-                $this->_touch($event, TRUE);
+                $this->_touch($event, true);
             }
-            
+
             Tinebase_TransactionManager::getInstance()->commitTransaction($transactionId);
         } catch (Exception $e) {
             Tinebase_TransactionManager::getInstance()->rollBack();