diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index 52b9a5af73..5fc907dddf 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -20,8 +20,6 @@ function mcp_forum_view($id, $mode, $action, $forum_info) include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx); - $url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . extra_url()); - // merge_topic is the quickmod action, merge_topics is the mcp_forum action, and merge_select is the mcp_topic action $merge_select = ($action == 'merge_select' || $action == 'merge_topic' || $action == 'merge_topics') ? true : false; @@ -38,6 +36,14 @@ function mcp_forum_view($id, $mode, $action, $forum_info) $source_topic_ids = array(request_var('t', 0)); $to_topic_id = request_var('to_topic_id', 0); + $url_extra = ''; + $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"); + // Resync Topics switch ($action) {