Skip to:
Content

bbPress.org


Ignore:
Timestamp:
09/09/2011 09:43:33 PM (10 years ago)
Author:
johnjamesjacoby
Message:

Fix issue when topics and replies are flagged as spam/trash where they would still update last active data for ancestors. Fixes #1631.
Fix issue when trashing and deleting a topic, replies may not be properly queried and updated. Fixes #1629.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-topic-template.php

    r3496 r3501  
    956956
    957957/**
     958 * Is the topic not spam or deleted?
     959 *
     960 * @since bbPress (r3496)
     961 *
     962 * @param int $topic_id Optional. Topic id
     963 * @uses bbp_get_topic_id() To get the topic id
     964 * @uses bbp_get_topic_status() To get the topic status
     965 * @return bool True if published, false if not.
     966 */
     967function bbp_is_topic_published( $topic_id = 0 ) {
     968    global $bbp;
     969
     970    $topic_status = bbp_get_topic_status( bbp_get_topic_id( $topic_id ) );
     971    return 'publish' == $topic_status;
     972}
     973
     974/**
    958975 * Is the topic marked as spam?
    959976 *
Note: See TracChangeset for help on using the changeset viewer.