Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 27 |
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 | |
| 28 | /** @var \phpbb\controller\helper $controller_helper */ |
| 29 | $controller_helper = $phpbb_container->get('controller.helper'); |
| 30 | |
| 31 | if ($request->is_set('avatar')) |
| 32 | { |
| 33 | $response = new RedirectResponse( |
| 34 | $controller_helper->route('phpbb_storage_avatar', array( |
| 35 | 'file' => $request->variable('avatar', ''), |
| 36 | ), false), |
| 37 | 301 |
| 38 | ); |
| 39 | $response->send(); |
| 40 | |
| 41 | exit; |
| 42 | } |
| 43 | |
| 44 | $attach_id = $request->variable('id', 0); |
| 45 | $mode = $request->variable('mode', ''); |
| 46 | $thumbnail = $request->variable('t', false); |
| 47 | |
| 48 | $response = new RedirectResponse( |
| 49 | $controller_helper->route('phpbb_storage_attachment', array( |
| 50 | 'id' => $attach_id, |
| 51 | 't' => $thumbnail, |
| 52 | ), false), |
| 53 | 301 |
| 54 | ); |
| 55 | $response->send(); |