#1479 closed defect (bug) (fixed)
bb_notify_subscribers incorrectly uses $bb_ksd_pre_post_status
Reported by: | Otto42 | Owned by: | |
---|---|---|---|
Milestone: | 1.2 | Priority: | normal |
Severity: | normal | Version: | 1.1-alpha |
Component: | API - Subscriptions | Keywords: | has-patch |
Cc: | peter.westwood@…, nightgunner5@…, jkudish |
Description
This code is in bb-includes/functions.bb-posts.php:
function bb_notify_subscribers( $post_id ) { global $bbdb, $bb_ksd_pre_post_status; if ( !empty( $bb_ksd_pre_post_status ) ) return false;
The purpose of it checking the $bb_ksd_pre_post_status global here is to prevent it from sending emails notifications when spam posts are made.
The problem is that $bb_ksd_pre_post_status is only used by Akismet internally. So this check is entirely dependent upon Akismet. If you use, say, the bozo plugin, then bozos who make posts will still have their posts emailed out to subscribers.
I think the fix is that the function should just be checking the post_status instead. Since Akismet hooks to pre_post_status to return the value of the $bb_ksd_pre_post_status, this shouldn't be a breaking change.
Attachments (1)
Change History (10)
#5
@
13 years ago
- Version changed from 1.0.1 to 1.1-alpha
Moving to 1.1-alpha Version as part of trac triage.
#6
@
13 years ago
- Milestone changed from 1.1 to 1.2
Moving to 1.2 milestone to release 1.1 for BuddyPress 1.5 compat.
#7
@
12 years ago
- Cc jkudish added
- Keywords has-patch added
In 1479-1.diff, I've removed the use of the $bb_ksd_pre_post_status
global in favor of using the post's post_status to check if the post is spam or coming from a bozo user.
Original ticket that added this: #1233