From 865c9bed1e82d7fc81f423ad9ce8ccdb767b9603 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 24 Jun 2010 17:39:29 -0400 Subject: [PATCH] Don't notifiy for changes to resource's copy of an event. --- kronolith/lib/Driver/Resource.php | 5 +++++ kronolith/lib/Driver/Sql.php | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/kronolith/lib/Driver/Resource.php b/kronolith/lib/Driver/Resource.php index 513fbf1a8..b73d952c0 100644 --- a/kronolith/lib/Driver/Resource.php +++ b/kronolith/lib/Driver/Resource.php @@ -265,4 +265,9 @@ class Kronolith_Driver_Resource extends Kronolith_Driver_Sql // noop } + protected function _handleNotifications($event, $action) + { + // noop + } + } diff --git a/kronolith/lib/Driver/Sql.php b/kronolith/lib/Driver/Sql.php index 58786a81c..92feaad11 100644 --- a/kronolith/lib/Driver/Sql.php +++ b/kronolith/lib/Driver/Sql.php @@ -599,7 +599,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver } /* Notify users about the changed event. */ - Kronolith::sendNotification($event, 'edit'); + $this->_handleNotifications($event, 'edit'); return $event->id; } @@ -657,7 +657,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver } /* Notify users about the new event. */ - Kronolith::sendNotification($event, 'add'); + $this->_handleNotifications($event, 'add'); return $id; } @@ -703,6 +703,11 @@ class Kronolith_Driver_Sql extends Kronolith_Driver $tagger->tag($event->uid, $event->tags, $cal->get('owner'), 'event'); } + protected function _handleNotifications($event, $action) + { + Kronolith::sendNotification($event, $action); + } + /** * Moves an event to a new calendar. * @@ -817,7 +822,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver /* Notify about the deleted event. */ if (!$silent) { - Kronolith::sendNotification($event, 'delete'); + $this->_handleNotifications($event, 'delete'); } /* See if this event represents an exception - if so, touch the base -- 2.11.0