Revert "Remove unnecessary wrapper."
authorJan Schneider <jan@horde.org>
Wed, 11 Aug 2010 21:07:32 +0000 (23:07 +0200)
committerJan Schneider <jan@horde.org>
Wed, 11 Aug 2010 21:08:18 +0000 (23:08 +0200)
This reverts commit c7375893b2adaf104954d3513a3cc48a17da9fb1.

Conflicts:

kronolith/lib/Driver/Sql.php

kronolith/lib/Driver/Sql.php

index d39cc1d..9a94883 100644 (file)
@@ -590,7 +590,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;
     }
@@ -649,7 +649,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
         }
 
         /* Notify users about the new event. */
-        Kronolith::sendNotification($event, 'add');
+        $this->_handleNotifications($event, 'add');
 
         return $event->id;
     }
@@ -695,6 +695,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.
      *
@@ -809,7 +814,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