Skip to:
Content

bbPress.org

Ticket #3111: 3111.patch

File 3111.patch, 696 bytes (added by mattrabe, 5 years ago)
  • src/includes/topics/functions.php

     
    23362336                                        $retval['view_all']    = true;
    23372337                                        $retval['status']      = wp_trash_post( $r['id'] );
    23382338                                        $retval['message']     = __( '<strong>ERROR</strong>: There was a problem trashing the topic.', 'bbpress' );
    2339                                         $retval['redirect_to'] = bbp_get_topic_permalink( $r['id'] );
     2339                                        $retval['redirect_to'] = current_user_can( 'view_trash' ) ? bbp_get_topic_permalink( $r['id'] ) : bbp_get_forum_permalink( $retval['status']->post_parent );
    23402340
    23412341                                        break;
    23422342