From b734fed853335ccc4e199d6d5cb1dac82761e71f Mon Sep 17 00:00:00 2001 From: v12mike Date: Mon, 27 Jan 2020 14:56:13 -0500 Subject: [PATCH] [ticket/16138] Eliminate redundant parameters from board URLs Revert mcp change to fix some moderator functions such as selecting topic for move posts PHPBB3-16138 --- phpBB/includes/mcp/mcp_forum.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index 4a49029e19..d3532a727a 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -43,7 +43,9 @@ function mcp_forum_view($id, $mode, $action, $forum_info) $to_topic_id = $request->variable('to_topic_id', 0); $url_extra = ''; - $url_extra .= ($post_id) ? "&p=$post_id" : (($topic_id) ? "&t=$topic_id" : (($forum_id) ? "&f=$forum_id" : '')); + $url_extra .= ($forum_id) ? "&f=$forum_id" : ''; + $url_extra .= ($GLOBALS['topic_id']) ? '&t=' . $GLOBALS['topic_id'] : ''; + $url_extra .= ($GLOBALS['post_id']) ? '&p=' . $GLOBALS['post_id'] : ''; $url_extra .= ($GLOBALS['user_id']) ? '&u=' . $GLOBALS['user_id'] : ''; $url = append_sid("{$phpbb_root_path}mcp.$phpEx?$url_extra");