mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-13 20:28:44 +01:00
[ticket/13647] Switch FAQ handling in view online to controller
PHPBB3-13647
This commit is contained in:
parent
19a236205f
commit
9c6fba558c
@ -163,6 +163,9 @@ $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
|
||||
$prev_id = $prev_ip = $user_list = array();
|
||||
$logged_visible_online = $logged_hidden_online = $counter = 0;
|
||||
|
||||
/** @var \phpbb\controller\helper $controller_helper */
|
||||
$controller_helper = $phpbb_container->get('controller.helper');
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if ($row['user_id'] != ANONYMOUS && !isset($prev_id[$row['user_id']]))
|
||||
@ -287,11 +290,6 @@ while ($row = $db->sql_fetchrow($result))
|
||||
$location_url = append_sid("{$phpbb_root_path}search.$phpEx");
|
||||
break;
|
||||
|
||||
case 'faq':
|
||||
$location = $user->lang['VIEWING_FAQ'];
|
||||
$location_url = append_sid("{$phpbb_root_path}faq.$phpEx");
|
||||
break;
|
||||
|
||||
case 'viewonline':
|
||||
$location = $user->lang['VIEWING_ONLINE'];
|
||||
$location_url = append_sid("{$phpbb_root_path}viewonline.$phpEx");
|
||||
@ -357,6 +355,13 @@ while ($row = $db->sql_fetchrow($result))
|
||||
default:
|
||||
$location = $user->lang['INDEX'];
|
||||
$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
|
||||
|
||||
if ($row['session_page'] === 'app.' . $phpEx . '/help/faq' ||
|
||||
$row['session_page'] === 'app.' . $phpEx . '/help/bbcode')
|
||||
{
|
||||
$location = $user->lang['VIEWING_FAQ'];
|
||||
$location_url = $controller_helper->route('phpbb_help_controller', array('mode' => 'faq'));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user