mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/16138] Eliminate redundant parameters from board URLs
Rebase to 3.3.x PHPBB3-16138
This commit is contained in:
@@ -51,8 +51,18 @@ function phpbb_module_warn_url($mode, $module_row)
|
||||
{
|
||||
global $forum_id, $post_id;
|
||||
|
||||
$url_extra = ($forum_id) ? "&f=$forum_id" : '';
|
||||
$url_extra .= ($post_id) ? "&p=$post_id" : '';
|
||||
if ($post_id)
|
||||
{
|
||||
$url_extra = "&p=$post_id";
|
||||
}
|
||||
else if ($forum_id)
|
||||
{
|
||||
$url_extra = "&f=$forum_id";
|
||||
}
|
||||
else
|
||||
{
|
||||
$url_extra = '';
|
||||
}
|
||||
|
||||
return $url_extra;
|
||||
}
|
||||
@@ -93,10 +103,22 @@ function phpbb_extra_url()
|
||||
{
|
||||
global $forum_id, $topic_id, $post_id, $report_id, $user_id;
|
||||
|
||||
$url_extra = '';
|
||||
$url_extra .= ($forum_id) ? "&f=$forum_id" : '';
|
||||
$url_extra .= ($topic_id) ? "&t=$topic_id" : '';
|
||||
$url_extra .= ($post_id) ? "&p=$post_id" : '';
|
||||
if ($post_id)
|
||||
{
|
||||
$url_extra = "&p=$post_id";
|
||||
}
|
||||
else if ($topic_id)
|
||||
{
|
||||
$url_extra = "&t=$topic_id";
|
||||
}
|
||||
else if ($forum_id)
|
||||
{
|
||||
$url_extra = "&f=$forum_id";
|
||||
}
|
||||
else
|
||||
{
|
||||
$url_extra = '';
|
||||
}
|
||||
$url_extra .= ($user_id) ? "&u=$user_id" : '';
|
||||
$url_extra .= ($report_id) ? "&r=$report_id" : '';
|
||||
|
||||
|
Reference in New Issue
Block a user