Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 22 |
|
0.00% |
0 / 1 |
CRAP | n/a |
0 / 0 |
|
| register_compatibility_globals | |
0.00% |
0 / 17 |
|
0.00% |
0 / 1 |
2 | |||
| 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 | */ |
| 16 | if (!defined('IN_PHPBB')) |
| 17 | { |
| 18 | exit; |
| 19 | } |
| 20 | |
| 21 | // |
| 22 | // Deprecated globals |
| 23 | // |
| 24 | define('ATTACHMENT_CATEGORY_WM', 2); // Windows Media Files - Streaming - @deprecated 3.2 |
| 25 | define('ATTACHMENT_CATEGORY_RM', 3); // Real Media Files - Streaming - @deprecated 3.2 |
| 26 | define('ATTACHMENT_CATEGORY_QUICKTIME', 6); // Quicktime/Mov files - @deprecated 3.2 |
| 27 | |
| 28 | /** |
| 29 | * Sets compatibility globals in the global scope |
| 30 | * |
| 31 | * This function registers compatibility variables to the global |
| 32 | * variable scope. This is required to make it possible to include this file |
| 33 | * in a service. |
| 34 | */ |
| 35 | function register_compatibility_globals() |
| 36 | { |
| 37 | global $phpbb_container; |
| 38 | |
| 39 | global $cache, $phpbb_dispatcher, $request, $user, $auth, $db, $config, $language, $phpbb_log; |
| 40 | global $symfony_request, $phpbb_filesystem, $phpbb_path_helper, $phpbb_extension_manager, $template; |
| 41 | |
| 42 | // set up caching |
| 43 | /* @var $cache \phpbb\cache\service */ |
| 44 | $cache = $phpbb_container->get('cache'); |
| 45 | |
| 46 | // Instantiate some basic classes |
| 47 | /* @var $phpbb_dispatcher \phpbb\event\dispatcher */ |
| 48 | $phpbb_dispatcher = $phpbb_container->get('event_dispatcher'); |
| 49 | |
| 50 | /* @var $request \phpbb\request\request_interface */ |
| 51 | $request = $phpbb_container->get('request'); |
| 52 | |
| 53 | /* @var $user \phpbb\user */ |
| 54 | $user = $phpbb_container->get('user'); |
| 55 | |
| 56 | /* @var \phpbb\language\language $language */ |
| 57 | $language = $phpbb_container->get('language'); |
| 58 | |
| 59 | /* @var $auth \phpbb\auth\auth */ |
| 60 | $auth = $phpbb_container->get('auth'); |
| 61 | |
| 62 | /* @var $db \phpbb\db\driver\driver_interface */ |
| 63 | $db = $phpbb_container->get('dbal.conn'); |
| 64 | |
| 65 | // Grab global variables, re-cache if necessary |
| 66 | /* @var $config phpbb\config\db */ |
| 67 | $config = $phpbb_container->get('config'); |
| 68 | |
| 69 | /* @var $phpbb_log \phpbb\log\log_interface */ |
| 70 | $phpbb_log = $phpbb_container->get('log'); |
| 71 | |
| 72 | /* @var $symfony_request \phpbb\symfony_request */ |
| 73 | $symfony_request = $phpbb_container->get('symfony_request'); |
| 74 | |
| 75 | /* @var $phpbb_filesystem \phpbb\filesystem\filesystem_interface */ |
| 76 | $phpbb_filesystem = $phpbb_container->get('filesystem'); |
| 77 | |
| 78 | /* @var $phpbb_path_helper \phpbb\path_helper */ |
| 79 | $phpbb_path_helper = $phpbb_container->get('path_helper'); |
| 80 | |
| 81 | // load extensions |
| 82 | /* @var $phpbb_extension_manager \phpbb\extension\manager */ |
| 83 | $phpbb_extension_manager = $phpbb_container->get('ext.manager'); |
| 84 | |
| 85 | /* @var $template \phpbb\template\template */ |
| 86 | $template = $phpbb_container->get('template'); |
| 87 | } |