diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-02 15:41:47 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-02 15:41:47 +0000 |
commit | ef58ac91e8c23832e657a4f8dee57fe0b7733ae8 (patch) | |
tree | 4c5979f253d66cba03731261d04cf5a0621b7816 /modules/notification/helpers/notification_event.php | |
parent | 89edd4d3ff307d79b82a3eb196b6bdad5be26804 (diff) |
Notifications now send emails when a comment is published. It won't
send the email if the comment status is not published. This gives the
administrator to moderate the comments prior to being published.
Diffstat (limited to 'modules/notification/helpers/notification_event.php')
-rw-r--r-- | modules/notification/helpers/notification_event.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/notification/helpers/notification_event.php b/modules/notification/helpers/notification_event.php index e7c7aac1..6336733a 100644 --- a/modules/notification/helpers/notification_event.php +++ b/modules/notification/helpers/notification_event.php @@ -35,10 +35,14 @@ class notification_event_Core { } static function comment_created($comment) { - notification::send_comment_added($comment); + if ($comment->state == "published") { + notification::send_comment_published($comment); + } } static function comment_updated($old, $new) { - notification::send_comment_changed($old, $new); + if ($new->state == "published" && $old->state != "published") { + notification::send_comment_published($new); + } } } |