1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[ticket/16138] Eliminate redundant parameters from board URLs

Rebase to 3.3.x

PHPBB3-16138
This commit is contained in:
v12mike
2019-12-02 07:34:22 -05:00
committed by Marc Alexander
parent 314ab17edd
commit adacf21edb
39 changed files with 276 additions and 222 deletions

View File

@@ -43,9 +43,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
$to_topic_id = $request->variable('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 .= ($post_id) ? "&p=$post_id" : (($topic_id) ? "&t=$topic_id" : (($forum_id) ? "&f=$forum_id" : ''));
$url_extra .= ($GLOBALS['user_id']) ? '&u=' . $GLOBALS['user_id'] : '';
$url = append_sid("{$phpbb_root_path}mcp.$phpEx?$url_extra");
@@ -542,8 +540,8 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
sync('forum', 'forum_id', $sync_forums, true, true);
// Link to the new topic
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&amp;t=$to_topic_id");
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $to_topic_id) . '">', '</a>');
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?t=$to_topic_id");
$redirect = reapply_sid($redirect);
/**