mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/13647] Switch FAQ handling in view online to controller
PHPBB3-13647
This commit is contained in:
parent
19a236205f
commit
9c6fba558c
1 changed files with 10 additions and 5 deletions
|
@ -163,6 +163,9 @@ $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
|
||||||
$prev_id = $prev_ip = $user_list = array();
|
$prev_id = $prev_ip = $user_list = array();
|
||||||
$logged_visible_online = $logged_hidden_online = $counter = 0;
|
$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))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
if ($row['user_id'] != ANONYMOUS && !isset($prev_id[$row['user_id']]))
|
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");
|
$location_url = append_sid("{$phpbb_root_path}search.$phpEx");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'faq':
|
|
||||||
$location = $user->lang['VIEWING_FAQ'];
|
|
||||||
$location_url = append_sid("{$phpbb_root_path}faq.$phpEx");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'viewonline':
|
case 'viewonline':
|
||||||
$location = $user->lang['VIEWING_ONLINE'];
|
$location = $user->lang['VIEWING_ONLINE'];
|
||||||
$location_url = append_sid("{$phpbb_root_path}viewonline.$phpEx");
|
$location_url = append_sid("{$phpbb_root_path}viewonline.$phpEx");
|
||||||
|
@ -357,6 +355,13 @@ while ($row = $db->sql_fetchrow($result))
|
||||||
default:
|
default:
|
||||||
$location = $user->lang['INDEX'];
|
$location = $user->lang['INDEX'];
|
||||||
$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
|
$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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue