dokufreaks/plugin-blogtng — Issue #72: Author Notification E-Mail does not work as expected
Author: casperklein
Created: 2011-10-18 20:46:00+00:00
State: open

I noticed, that I (the author of a blog entry) only receive a notification on new comments, when I enable comment subscriptions.

I think that behavior is wrong.

File helper/comments.php:

Line 141: ```if($this->getConf('comments_subscription')) {```
Line 145: ```// send subscriber and notify mails```
Line 146: ```$this->send_subscriber_mails($comment);```
Line 147: ```}```

If the ```comments_subscription``` is set, then call send_subscriber_mails().
In this function the author is notified via email and right after that:

Line 220: ```// finish here when subscriptions disabled```
Line 221: ```if(!$this->getConf('comments_subscription')) return;```

Line 221 can never be false, as this was already checked in line 141 before calling.
The author is never notified, unless comment_subscription is enabled. After looking at the code, I think the original purpose was, that the author should be notified regardless of the comment_subscription value.

The solution could be, to exclude Line 146 from the if block and call it just afterwards.