Don't notifiy for changes to resource's copy of an event.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 24 Jun 2010 21:39:29 +0000 (17:39 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 24 Jun 2010 21:40:13 +0000 (17:40 -0400)
kronolith/lib/Driver/Resource.php
kronolith/lib/Driver/Sql.php

index 513fbf1..b73d952 100644 (file)
@@ -265,4 +265,9 @@ class Kronolith_Driver_Resource extends Kronolith_Driver_Sql
         // noop
     }
 
+    protected function _handleNotifications($event, $action)
+    {
+        // noop
+    }
+
 }
index 58786a8..92feaad 100644 (file)
@@ -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