diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-01 03:58:31 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-01 03:58:31 +0000 |
commit | 6f358291733b5844f5e9beaa747f554a0049e27a (patch) | |
tree | af9347258c8423ece92053180fea759720b04aef /modules/notification/helpers/notification_event.php | |
parent | d49484c9a65681f0ee41490c098a0b4d7a938c0e (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.php | 18 |
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); } } |