Skip to:
Content

bbPress.org

Changeset 6826


Ignore:
Timestamp:
07/04/2018 03:07:22 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Replies: use existing reply_to value if none is passed.

This change fixes a bug that would cause the reply hierarchy to be broken when non-moderator users would edit their existing replies within the allotted editing period.

Props wpdennis. Fixes #3205.

File:
1 edited

Legend:

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

    r6794 r6826  
    635635
    636636    // Handle Reply To of the reply; $_REQUEST for non-JS submissions
    637     if ( isset( $_REQUEST['bbp_reply_to'] ) ) {
     637    if ( isset( $_REQUEST['bbp_reply_to'] ) && current_user_can( 'moderate', $reply_id ) ) {
    638638        $reply_to = bbp_validate_reply_to( $_REQUEST['bbp_reply_to'], $reply_id );
     639    } elseif ( bbp_thread_replies() ) {
     640        $reply_to = bbp_get_reply_to( $reply_id );
    639641    }
    640642
Note: See TracChangeset for help on using the changeset viewer.