summaryrefslogtreecommitdiff
path: root/modules/notification/helpers/notification_event.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-02-01 03:58:31 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-02-01 03:58:31 +0000
commit6f358291733b5844f5e9beaa747f554a0049e27a (patch)
treeaf9347258c8423ece92053180fea759720b04aef /modules/notification/helpers/notification_event.php
parentd49484c9a65681f0ee41490c098a0b4d7a938c0e (diff)
Simplify the setting of a notifications. Notifications are not only
set on a album. The notifications are implicitly active for all child elements. It now sends emails if the email address of the subscribed user has been set. No email, no attempt to send the notification. Still to do, come up with better messages as the current ones are just place holders.
Diffstat (limited to 'modules/notification/helpers/notification_event.php')
-rw-r--r--modules/notification/helpers/notification_event.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/notification/helpers/notification_event.php b/modules/notification/helpers/notification_event.php
index 06b5b1f6..415093a5 100644
--- a/modules/notification/helpers/notification_event.php
+++ b/modules/notification/helpers/notification_event.php
@@ -18,9 +18,27 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class notification_event_Core {
+ static function item_updated($old, $new) {
+ notification::send_item_changed($old, $new);
+ }
+
+ static function item_created($item) {
+ notification::send_item_add($item);
+ }
+
+ static function item_before_delete($item) {
+ notification::send_item_deleted($item);
+
+ if (notification::is_watching($item)) {
+ notification::remove_watch($item);
+ }
+ }
+
static function comment_created($comment) {
+ notification::send_comment_added($comment);
}
static function comment_updated($old, $new) {
+ notification::send_comment_changed($old, $new);
}
}