Skip to:
Content

#3111 closed enhancement (fixed)

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

Reported by: mattrabe Owned by: johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version: trunk
Component: Component - Topics 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 21 months ago.

Download all attachments as: .zip

Change History (3)

@mattrabe
21 months ago

#1 @johnjamesjacoby
21 months ago

  • Keywords has-patch commit added
  • Milestone changed from Awaiting Review to 2.6
  • Owner set to johnjamesjacoby
  • Type changed from defect to enhancement

#2 @johnjamesjacoby
21 months ago

  • Resolution set to fixed
  • Status changed from new to closed

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.