Commit 46fb476f authored by greggles's avatar greggles

bug #327211 by greggles: send notices when a moderated comment is unmoderated.

parent a67a6090
......@@ -224,6 +224,8 @@ function comment_notify_page() {
function comment_notify_comment($comment, $op) {
global $user;
// In theory, the update or insert operations are duplicates with publish which
// would lead to duplicate messages. _comment_notify_mailalert() protects against that.
switch ($op) {
case 'validate':
// We assume that if they are non-anonymous then they have a valid mail.
......@@ -232,6 +234,10 @@ function comment_notify_comment($comment, $op) {
form_set_error('mail', t('If you want to subscribe to comments you must supply a valid e-mail address.'));
}
break;
case 'publish':
// And send notifications - the real purpose of the module.
_comment_notify_mailalert($comment);
break;
case 'update':
// In case they have changed their status, save it in the database.
$sql = 'UPDATE {comment_notify} SET notify = %d WHERE cid = %d';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment