Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/23/2024 08:27:45 PM (15 months ago)
Author:
johnjamesjacoby
Message:

Topic/Reply: improvements to status updates.

This change includes 2 fixes:

  • Prefer $topic_id over $topic->ID, and use it (instead of $forum_id) when checking for moderation capability
  • Add missing logic in bbp_edit_reply_handler() that was preventing statuses from saving as intended

See #2644.

In branches/2.6, for 2.6.10.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/src/includes/topics/functions.php

    r7208 r7255  
    580580
    581581    // Maybe force into pending
    582     if ( bbp_is_topic_public( $topic->ID ) && ! bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content ) ) {
     582    if ( bbp_is_topic_public( $topic_id ) && ! bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content ) ) {
    583583        $topic_status = bbp_get_pending_status_id();
    584584
     
    587587
    588588        // Allow capable users to explicitly override the status
    589         if ( current_user_can( 'moderate', $forum_id ) ) {
     589        if ( current_user_can( 'moderate', $topic_id ) ) {
    590590            $topic_status = sanitize_key( $_POST['bbp_topic_status'] );
    591591
Note: See TracChangeset for help on using the changeset viewer.