Skip to:
Content

bbPress.org

Changeset 4810


Ignore:
Timestamp:
03/15/2013 10:16:20 AM (9 years ago)
Author:
johnjamesjacoby
Message:

When unspamming a topic or reply, check for empty prespam status, and default to public. Fixes #2243.

Location:
trunk/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/replies/functions.php

    r4805 r4810  
    15341534    $reply['post_status'] = get_post_meta( $reply_id, '_bbp_spam_meta_status', true );
    15351535
     1536    // If no previous status, default to publish
     1537    if ( empty( $reply['post_status'] ) ) {
     1538        $reply['post_status'] = bbp_get_public_status_id();
     1539    }
     1540
    15361541    // Delete pre spam meta
    15371542    delete_post_meta( $reply_id, '_bbp_spam_meta_status' );
  • trunk/includes/topics/functions.php

    r4782 r4810  
    28642864    $topic_status = get_post_meta( $topic_id, '_bbp_spam_meta_status', true );
    28652865
     2866    // If no previous status, default to publish
     2867    if ( empty( $topic_status ) ) {
     2868        $topic_status = bbp_get_public_status_id();
     2869    }
     2870
    28662871    // Set post status to pre spam
    28672872    $topic['post_status'] = $topic_status;
Note: See TracChangeset for help on using the changeset viewer.