function subscriptions_content_comment_update in Subscriptions 7
Same name and namespace in other branches
- 2.0.x subscriptions_content/subscriptions_content.module \subscriptions_content_comment_update()
Implements hook_comment_update().
Catches comment updates and send them to the subscriptions queue.
Parameters
object $comment:
File
- ./
subscriptions_content.module, line 393 - Subscriptions to content events
Code
function subscriptions_content_comment_update($comment) {
$node = node_load($comment->nid);
if (!isset($comment->subscriptions_notify) || $comment->subscriptions_notify) {
$event = array(
'module' => 'node',
'load_function' => 'subscriptions_content_load_comment',
'load_args' => $comment->cid,
'uid' => $comment->uid,
'type' => 'comment',
'action' => 'update',
'is_new' => $comment->status == COMMENT_PUBLISHED && $comment->original->status != COMMENT_PUBLISHED,
'node' => $node,
'comment' => $comment,
);
subscriptions_queue($event);
}
_subscriptions_content_autosubscribe($node->type, 'node', 'nid', $comment->nid, 'on_comment');
}