phpBB Digests

Digest sent when there are no qualifying posts - phpBB Digests

Digest sent when there are no qualifying posts

Postby MarkDHamill » Mon Oct 03, 2011 11:43 pm

Discovered a small bug in mail_digests.php in version 2.2.18. Essentially, a digest can be sent to someone who specifically declined to get one if there are no posts, even if there are no qualifying posts. The logic in version 2.2.17 is actually correct. So change line 619 in mail digests.php from:

Code: Select all
      if ($row['user_digest_send_on_no_posts'] || (sizeof($rowset_posts) > 0) || ((sizeof($pm_rowset) > 0) && $row['user_digest_show_pms']))


to:

Code: Select all
      if ($row['user_digest_send_on_no_posts'] || $toc_post_count > 0 || ((sizeof($pm_rowset) > 0) && $row['user_digest_show_pms']))
Get the latest versions of my Digests and Smartfeed mods.
MarkDHamill
Registered User
 
Posts: 2117
Joined: Fri Aug 02, 2002 12:36 am
Location: Oak Hill, Virginia USA

Re: Digest sent when there are no qualifying posts

Postby MarkDHamill » Wed Oct 05, 2011 7:10 pm

Oops, my correction is in error. See correction above. The correct line should be:

Code: Select all
      if ($row['user_digest_send_on_no_posts'] || $toc_post_count > 0 || ((sizeof($pm_rowset) > 0) && $row['user_digest_show_pms']))


Otherwise subscribers may not get a post at all, which would be bad.
Get the latest versions of my Digests and Smartfeed mods.
MarkDHamill
Registered User
 
Posts: 2117
Joined: Fri Aug 02, 2002 12:36 am
Location: Oak Hill, Virginia USA