Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 33 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | /** |
| 3 | * |
| 4 | * This file is part of the phpBB Forum Software package. |
| 5 | * |
| 6 | * @copyright (c) phpBB Limited <https://www.phpbb.com> |
| 7 | * @license GNU General Public License, version 2 (GPL-2.0) |
| 8 | * |
| 9 | * For full copyright and license information, please see |
| 10 | * the docs/CREDITS.txt file. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | use Symfony\Component\HttpFoundation\RedirectResponse; |
| 15 | |
| 16 | /** |
| 17 | * @ignore |
| 18 | */ |
| 19 | define('IN_PHPBB', true); |
| 20 | $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; |
| 21 | $phpEx = substr(strrchr(__FILE__, '.'), 1); |
| 22 | include($phpbb_root_path . 'common.' . $phpEx); |
| 23 | |
| 24 | // Start session management |
| 25 | $user->session_begin(); |
| 26 | $auth->acl($user->data); |
| 27 | $user->setup('memberlist'); |
| 28 | |
| 29 | // Get and set some variables |
| 30 | $mode = $request->variable('mode', null); |
| 31 | $session_id = $request->variable('s', null); |
| 32 | $start = $request->variable('start', null); |
| 33 | $sort_key = $request->variable('sk', null); |
| 34 | $sort_dir = $request->variable('sd', null); |
| 35 | $show_guests = ($config['load_online_guests']) ? $request->variable('sg', null) : null; |
| 36 | |
| 37 | |
| 38 | /** @var \phpbb\controller\helper $controller_helper */ |
| 39 | $controller_helper = $phpbb_container->get('controller.helper'); |
| 40 | |
| 41 | if ($mode == 'whois') |
| 42 | { |
| 43 | $response = new RedirectResponse( |
| 44 | $controller_helper->route('phpbb_members_online_whois', array( |
| 45 | 's' => $session_id, |
| 46 | ), false), |
| 47 | 301 |
| 48 | ); |
| 49 | } |
| 50 | else |
| 51 | { |
| 52 | $response = new RedirectResponse( |
| 53 | $controller_helper->route('phpbb_members_online', array( |
| 54 | 'mode' => $mode, |
| 55 | 's' => $session_id, |
| 56 | 'start' => $start, |
| 57 | 'sk' => $sort_key, |
| 58 | 'sd' => $sort_dir, |
| 59 | 'sg' => $show_guests, |
| 60 | ), false), |
| 61 | 301 |
| 62 | ); |
| 63 | } |
| 64 | $response->send(); |