Skip to:
Content

bbPress.org

Changeset 2419


Ignore:
Timestamp:
04/09/2010 05:17:33 PM (16 years ago)
Author:
chrishajer
Message:

Check bb_ksd_pre_post_status before sending out "subscribe to topic" notifications". Fixes #1233, props Nightgunner5

Location:
trunk/bb-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-includes/functions.bb-posts.php

    r2390 r2419  
    454454
    455455function bb_notify_subscribers( $post_id ) {
    456     global $bbdb, $bb_current_user;
     456    global $bbdb, $bb_current_user, $bb_ksd_pre_post_status;
     457
     458    if ( !empty( $bb_ksd_pre_post_status ) )
     459        return false;
    457460
    458461    if ( !$post = bb_get_post( $post_id ) )
     
    481484
    482485        $message = __( "%2\$s wrote:\n\n %3\$s\n\nTopic Link: %4\$s\n\nYou're getting this mail because you subscribed to the topic, visit the topic and login to unsubscribe." );
    483         bb_mail(
    484             $user->user_email,
    485             '[' . bb_get_option('name') . '] ' . get_topic_title( $topic_id ),
    486             sprintf( $message, get_topic_title( $topic_id ), get_user_name( $post->poster_id ), strip_tags( get_post_text( $post_id ) ), get_post_link( $post_id ) ),
    487             'From: '.bb_get_option('name').' <'.bb_get_option('from_email').'>'
     486        bb_mail(
     487            $user->user_email,
     488            '[' . bb_get_option('name') . '] ' . get_topic_title( $topic_id ),
     489            sprintf( $message, get_topic_title( $topic_id ), get_user_name( $post->poster_id ), strip_tags( get_post_text( $post_id ) ), get_post_link( $post_id ) )
    488490        );
    489491    }
  • trunk/bb-includes/functions.bb-template.php

    r2411 r2419  
    34083408    global $topic, $bb_current_user, $bbdb, $bb;
    34093409
    3410     if ( !$bb_current_user )
     3410    if ( !bb_is_user_logged_in() )
    34113411        return false;
    34123412
Note: See TracChangeset for help on using the changeset viewer.