Skip to:
Content

bbPress.org

Ticket #2243: topics-functions.patch

File topics-functions.patch, 1.2 KB (added by alex-ye, 9 years ago)
  • functions.php

    # This patch file was generated by NetBeans IDE
    # Following Index: paths are relative to: \includes\topics
    # It uses platform neutral UTF-8 encoding and \n newlines.
    # Above lines and this line are ignored by the patching process.
     
    643643
    644644        if ( !empty( $topic_id ) && !is_wp_error( $topic_id ) ) {
    645645
     646                /** Spam Check ********************************************************/
     647
     648                // If reply or topic are spam, officially spam this reply
     649                if ( $topic_data['post_status'] == bbp_get_spam_status_id() ) {
     650                        update_post_meta( $topic_id, '_bbp_spam_meta_status', $topic_status );
     651
     652                        // Force view=all
     653                        $view_all = true;
     654                }
     655
    646656                // Update counts, etc...
    647657                do_action( 'bbp_edit_topic', $topic_id, $forum_id, $anonymous_data, $topic_author , true /* Is edit */ );
    648658
     
    710720                $redirect_to = bbp_get_redirect_to();
    711721
    712722                // View all?
    713                 $view_all = bbp_get_view_all();
     723                $view_all = ( !empty( $view_all ) || bbp_get_view_all() );
    714724
    715725                // Get the topic URL
    716726                $topic_url = bbp_get_topic_permalink( $topic_id, $redirect_to );