function comment_notify_comment_update in Comment Notify 7
Same name and namespace in other branches
- 8 comment_notify.module \comment_notify_comment_update()
Implements hook_comment_update().
File
- ./
comment_notify.module, line 243 - This module provides comment follow-up e-mail notification for anonymous and registered users.
Code
function comment_notify_comment_update($comment) {
module_load_include('inc', 'comment_notify', 'comment_notify');
// Take the status of the "notify" checkbox if they unchecked it.
if (empty($comment->notify)) {
$status = COMMENT_NOTIFY_DISABLED;
}
else {
$status = $comment->notify_type;
}
// In case they have changed their status, save it in the database.
if (isset($status)) {
comment_notify_update_notification($comment->cid, $status);
}
// And send notifications - the real purpose of the module.
if ($comment->status == COMMENT_PUBLISHED) {
_comment_notify_mailalert($comment);
}
}