Skip to:
Content

bbPress.org

Opened 9 years ago

Closed 9 years ago

Last modified 3 years ago

#3111 closed enhancement (fixed)

Trashing redirects to home instead of forum depending on capabilities - fix included

Reported by: mattrabe Owned by: johnjamesjacoby
Priority: normal Milestone: 2.6
Component: Component - Topics Version: trunk
Severity: normal Keywords: has-patch commit
Cc:

Description

If user has delete_topics capability but not view_trash capability, trashing a topic from the topic page produces a redirect_to value of bbp_get_topic_permalink( $r['id'] ), but since the user cannot viewed that newly-trashed topic, they end up double-redirected to home. This seems counter-intuitive, and I feel that the appropriate action is to set redirect_to to bbp_get_forum_permalink( $retval['status']->post_parent ) (parent forum page) instead.

I am currently using 2.6-beta-2. Change has been made on my end, I will commit a patch shortly.

Attachments (1)

3111.patch (696 bytes ) - added by mattrabe 9 years ago.

Download all attachments as: .zip

Change History (3)

@mattrabe
9 years ago

#1 @johnjamesjacoby
9 years ago

  • Keywords has-patch commit added
  • Milestone Awaiting Review2.6
  • Owner set to johnjamesjacoby
  • Type defectenhancement

#2 @johnjamesjacoby
9 years ago

  • Resolutionfixed
  • Status newclosed

In 6504:

Topics: Redirect to forum when trashing a topic and the user cannot view trash.

Fixes #3111. Props mattrabe.

Note: See TracTickets for help on using tickets.