mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/16138] Eliminate redundant parameters from board URLs
Minor fixes after review PHPBB3-16138
This commit is contained in:
parent
adacf21edb
commit
62f59fa59d
1 changed files with 7 additions and 9 deletions
|
@ -42,25 +42,24 @@ $submit = $request->is_set_post('post') && !$refresh && !$preview;
|
||||||
$mode = $request->variable('mode', '');
|
$mode = $request->variable('mode', '');
|
||||||
|
|
||||||
// We need to choose which of the url parameters we must trust and ignore the others
|
// We need to choose which of the url parameters we must trust and ignore the others
|
||||||
$forum_id = 0;
|
$forum_id = 0;
|
||||||
$topic_id = 0;
|
$topic_id = 0;
|
||||||
$post_id = 0;
|
$post_id = 0;
|
||||||
|
|
||||||
switch ($mode)
|
switch ($mode)
|
||||||
{
|
{
|
||||||
case 'popup':
|
case 'popup':
|
||||||
case 'smilies':
|
case 'smilies':
|
||||||
$forum_id = $request->variable('f', 0);
|
$forum_id = $request->variable('f', 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'post':
|
case 'post':
|
||||||
$forum_id = $request->variable('f', 0);
|
$forum_id = $request->variable('f', 0);
|
||||||
if (!$forum_id)
|
if (!$forum_id)
|
||||||
{
|
{
|
||||||
$user->setup('posting');
|
|
||||||
trigger_error('NO_FORUM');
|
trigger_error('NO_FORUM');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'bump':
|
case 'bump':
|
||||||
case 'reply':
|
case 'reply':
|
||||||
|
@ -76,10 +75,9 @@ switch ($mode)
|
||||||
}
|
}
|
||||||
if (!$topic_id || !$forum_id)
|
if (!$topic_id || !$forum_id)
|
||||||
{
|
{
|
||||||
$user->setup('posting');
|
|
||||||
trigger_error('NO_TOPIC');
|
trigger_error('NO_TOPIC');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'edit':
|
case 'edit':
|
||||||
case 'delete':
|
case 'delete':
|
||||||
|
@ -106,7 +104,7 @@ switch ($mode)
|
||||||
$user->setup('posting');
|
$user->setup('posting');
|
||||||
trigger_error('NO_POST');
|
trigger_error('NO_POST');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue