Skip to content

Commit 8868023

Browse files
committed
[ticket/17369] Add forum id to approve action url for redirection
Added the forum_id to the approve action link which ensures that when a topic is permanently deleted, the forum_id is present so that it can be used in the redirection link to go to the previous forum. This addresses a bug in which the forum_id is not provided and after deleting a topic, the user will be taken to a 404 page as the forum id fallbacks to 0. PHPBB-17369
1 parent 56b9d5a commit 8868023

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

viewtopic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2071,7 +2071,7 @@
20712071
'U_EMAIL' => $user_cache[$poster_id]['email'],
20722072
'U_JABBER' => $user_cache[$poster_id]['jabber'],
20732073

2074-
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p={$row['post_id']}&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url . '&p=' . $row['post_id'] . '#p' . $row['post_id']))),
2074+
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p={$row['post_id']}&f={$row['forum_id']}&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url . '&p=' . $row['post_id'] . '#p' . $row['post_id']))),
20752075
'U_REPORT' => ($auth->acl_get('f_report', $forum_id)) ? $phpbb_container->get('controller.helper')->route('phpbb_report_post_controller', array('id' => $row['post_id'])) : '',
20762076
'U_MCP_REPORT' => ($auth->acl_get('m_report', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&p=' . $row['post_id'], true, $user->session_id) : '',
20772077
'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&p=' . $row['post_id'], true, $user->session_id) : '',

0 commit comments

Comments
 (0)