commit e099332ee56b37085b39e4122c6cd9495e535d7e Author: Florian Weber Date: Sun Aug 7 23:43:42 2011 +0200 Issue #1084802 by webflo: Comment subscription not working. Action hooks empty. diff --git a/notifications_content/notifications_content.inc b/notifications_content/notifications_content.inc index 7f6ac23..8b95217 100644 --- a/notifications_content/notifications_content.inc +++ b/notifications_content/notifications_content.inc @@ -337,7 +337,7 @@ class Notifications_Node_Comment_Template extends Notifications_Node_Event_Templ '#tokens' => TRUE, 'header' => t('Comment by [comment:name]: [comment:title]', array(), $options), 'content' => '[comment:body]', - 'footer' => t('Read more [comment-url]', array(), $options), + 'footer' => t('Read more [comment:url]', array(), $options), ); case 'digest': return array( diff --git a/notifications_content/notifications_content.module b/notifications_content/notifications_content.module index 9b6f2f6..d68a82b 100644 --- a/notifications_content/notifications_content.module +++ b/notifications_content/notifications_content.module @@ -521,6 +521,20 @@ function notifications_content_node_event_enabled($action, $node) { * * @ingroup actions */ +function notifications_content_comment_action($node, $context = array()) { + $comment = $context['comment']; + // Just for new comments that are published and updated comments that change status. + if (!empty($comment->status) && empty($comment->notifications_content_disable)) { + $node = node_load($comment->nid); + notifications_content_node_event('comment', $node)->add_object('comment', $comment)->trigger(); + } +} + +/** + * Send comment notificaitons + * + * @ingroup actions + */ function notifications_content_comment_insert_action($node, $context = array()) { }