Changeset 7255
- Timestamp:
- 06/23/2024 08:27:45 PM (9 months ago)
- Location:
- branches/2.6/src/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.6/src/includes/replies/functions.php
r7242 r7255 641 641 /** Reply Status **********************************************************/ 642 642 643 // Get available reply statuses 644 $reply_statuses = bbp_get_reply_statuses( $reply_id ); 645 643 646 // Use existing post_status 644 647 $reply_status = $reply->post_status; … … 647 650 if ( bbp_is_reply_public( $reply_id ) && ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) { 648 651 $reply_status = bbp_get_pending_status_id(); 652 653 // Check for possible posted reply status 654 } elseif ( ! empty( $_POST['bbp_reply_status'] ) && in_array( $_POST['bbp_reply_status'], array_keys( $reply_statuses ), true ) ) { 655 656 // Allow capable users to explicitly override the status 657 if ( current_user_can( 'moderate', $reply_id ) ) { 658 $reply_status = sanitize_key( $_POST['bbp_reply_status'] ); 659 660 // Not capable 661 } else { 662 bbp_add_error( 'bbp_edit_reply_status', __( '<strong>Error</strong>: You do not have permission to do that.', 'bbpress' ) ); 663 } 649 664 } 650 665 … … 2057 2072 * 2058 2073 * @param string $where 2074 * @param WP_Query $query 2059 2075 * @return string 2060 2076 */ -
branches/2.6/src/includes/topics/functions.php
r7208 r7255 580 580 581 581 // 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 ) ) { 583 583 $topic_status = bbp_get_pending_status_id(); 584 584 … … 587 587 588 588 // Allow capable users to explicitly override the status 589 if ( current_user_can( 'moderate', $ forum_id ) ) {589 if ( current_user_can( 'moderate', $topic_id ) ) { 590 590 $topic_status = sanitize_key( $_POST['bbp_topic_status'] ); 591 591
Note: See TracChangeset
for help on using the changeset viewer.