Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 20
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/**
15* @ignore
16*/
17
18use Symfony\Component\HttpFoundation\RedirectResponse;
19
20define('IN_PHPBB', true);
21$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
22$phpEx = substr(strrchr(__FILE__, '.'), 1);
23include($phpbb_root_path . 'common.' . $phpEx);
24
25if (basename($symfony_request->getScriptName()) === 'app.php')
26{
27    $base_path = $symfony_request->getBasePath();
28    $path_info = $symfony_request->getPathInfo();
29    $query_string = $symfony_request->getQueryString();
30
31    $url = $base_path . '/index.php' . $path_info . ($query_string ? '?' . $query_string : '');
32
33    $response = new RedirectResponse($url, 301);
34    $response->send();
35
36    exit;
37}
38
39// Start session management
40$user->session_begin();
41$auth->acl($user->data);
42$user->setup('app');
43
44/* @var $http_kernel \Symfony\Component\HttpKernel\HttpKernel */
45$http_kernel = $phpbb_container->get('http_kernel');
46
47/* @var $symfony_request \phpbb\symfony_request */
48$symfony_request = $phpbb_container->get('symfony_request');
49$response = $http_kernel->handle($symfony_request);
50$response->send();
51$http_kernel->terminate($symfony_request, $response);