Skip to:
Content

bbPress.org

Changeset 3275


Ignore:
Timestamp:
05/29/2011 07:38:39 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Add spam checks to new topic and reply handlers. If topic/reply is spam to start, add the proper meta_status in the event it was a false positive.

Location:
branches/plugin/bbp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-reply-functions.php

    r3268 r3275  
    299299                }
    300300
    301                 // Update counts, etc...
     301                /** Spam Check ************************************************/
     302               
     303                // If reply or topic are spam, officially spam this reply
     304                if ( bbp_is_topic_spam( $topic_id ) || ( $reply_data['post_status'] == $bbp->spam_status_id ) )
     305                    add_post_meta( $reply_id, '_bbp_spam_meta_status', 'publish' );
     306
     307                /** Update counts, etc... *************************************/
     308
    302309                do_action( 'bbp_new_reply', $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author );
    303310
  • branches/plugin/bbp-includes/bbp-topic-functions.php

    r3265 r3275  
    235235                }
    236236
    237                 // Update counts, etc...
     237                /** Spam Check ************************************************/
     238               
     239                // If reply or topic are spam, officially spam this reply
     240                if ( $topic_data['post_status'] == $bbp->spam_status_id )
     241                    add_post_meta( $topic_id, '_bbp_spam_meta_status', 'publish' );
     242
     243                /** Update counts, etc... *************************************/
     244
    238245                do_action( 'bbp_new_topic', $topic_id, $forum_id, $anonymous_data, $topic_author );
    239246
Note: See TracChangeset for help on using the changeset viewer.