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 | /** |
| 15 | * @ignore |
| 16 | */ |
| 17 | define('IN_PHPBB', true); |
| 18 | define('IN_INSTALL', true); |
| 19 | |
| 20 | $phpbb_root_path = '../'; |
| 21 | $phpEx = substr(strrchr(__FILE__, '.'), 1); |
| 22 | |
| 23 | if (version_compare(PHP_VERSION, '7.2.0', '<')) |
| 24 | { |
| 25 | die('You are running an unsupported PHP version (' . PHP_VERSION . '). Please upgrade to PHP 7.2.0 or higher before trying to install or update to phpBB 3.3'); |
| 26 | } |
| 27 | |
| 28 | $startup_new_path = $phpbb_root_path . 'install/update/update/new/install/startup.' . $phpEx; |
| 29 | $startup_path = (file_exists($startup_new_path)) ? $startup_new_path : $phpbb_root_path . 'install/startup.' . $phpEx; |
| 30 | require($startup_path); |
| 31 | |
| 32 | /** @var \phpbb\filesystem\filesystem $phpbb_filesystem */ |
| 33 | $phpbb_filesystem = $phpbb_installer_container->get('filesystem'); |
| 34 | |
| 35 | /** @var \phpbb\template\template $template */ |
| 36 | $template = $phpbb_installer_container->get('template'); |
| 37 | |
| 38 | // Path to templates |
| 39 | $paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style'); |
| 40 | $paths = array_filter($paths, 'is_dir'); |
| 41 | |
| 42 | $template->set_custom_style(array( |
| 43 | array( |
| 44 | 'name' => 'adm', |
| 45 | 'ext_path' => 'adm/style/', |
| 46 | ), |
| 47 | ), $paths); |
| 48 | |
| 49 | /** @var $phpbb_dispatcher \phpbb\event\dispatcher */ |
| 50 | $phpbb_dispatcher = $phpbb_installer_container->get('event_dispatcher'); |
| 51 | |
| 52 | /** @var \phpbb\language\language $language */ |
| 53 | $language = $phpbb_installer_container->get('language'); |
| 54 | $language->add_lang(array('common', 'acp/common', 'acp/board', 'install', 'posting')); |
| 55 | |
| 56 | /** @var $http_kernel \Symfony\Component\HttpKernel\HttpKernel */ |
| 57 | $http_kernel = $phpbb_installer_container->get('http_kernel'); |
| 58 | |
| 59 | /** @var $symfony_request \phpbb\symfony_request */ |
| 60 | $symfony_request = $phpbb_installer_container->get('symfony_request'); |
| 61 | $response = $http_kernel->handle($symfony_request); |
| 62 | $response->send(); |
| 63 | $http_kernel->terminate($symfony_request, $response); |