aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/compatibility_globals.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/compatibility_globals.php')
-rw-r--r--phpBB/includes/compatibility_globals.php47
1 files changed, 47 insertions, 0 deletions
diff --git a/phpBB/includes/compatibility_globals.php b/phpBB/includes/compatibility_globals.php
new file mode 100644
index 0000000000..54c9287c96
--- /dev/null
+++ b/phpBB/includes/compatibility_globals.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+/**
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+// set up caching
+$cache = $phpbb_container->get('cache');
+
+// Instantiate some basic classes
+$phpbb_dispatcher = $phpbb_container->get('dispatcher');
+$request = $phpbb_container->get('request');
+$user = $phpbb_container->get('user');
+$auth = $phpbb_container->get('auth');
+$db = $phpbb_container->get('dbal.conn');
+
+// make sure request_var uses this request instance
+request_var('', 0, false, false, $request); // "dependency injection" for a function
+
+// Grab global variables, re-cache if necessary
+$config = $phpbb_container->get('config');
+set_config(null, null, null, $config);
+set_config_count(null, null, null, $config);
+
+$phpbb_log = $phpbb_container->get('log');
+$symfony_request = $phpbb_container->get('symfony_request');
+$phpbb_filesystem = $phpbb_container->get('filesystem');
+$phpbb_path_helper = $phpbb_container->get('path_helper');
+
+// load extensions
+$phpbb_extension_manager = $phpbb_container->get('ext.manager');
+
+$template = $phpbb_container->get('template');