aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2014-05-02 19:01:26 +0200
committerAndreas Fischer <bantu@phpbb.com>2014-05-02 19:01:26 +0200
commitd798184d08f9da9fb4c011959d612a5395341fd9 (patch)
tree3a81cfca39989b82600b1b0858f6692cc9ba87cb /phpBB
parenta9ae1f83c7caa461ca2a13b9ef41f1b3140b7d22 (diff)
downloadforums-d798184d08f9da9fb4c011959d612a5395341fd9.tar
forums-d798184d08f9da9fb4c011959d612a5395341fd9.tar.gz
forums-d798184d08f9da9fb4c011959d612a5395341fd9.tar.bz2
forums-d798184d08f9da9fb4c011959d612a5395341fd9.tar.xz
forums-d798184d08f9da9fb4c011959d612a5395341fd9.zip
[ticket/12473] Move compatibility globals out into its own file.
PHPBB3-12473
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/common.php29
-rw-r--r--phpBB/includes/compatibility_globals.php44
2 files changed, 45 insertions, 28 deletions
diff --git a/phpBB/common.php b/phpBB/common.php
index 12dbe5a62c..4ad669a021 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -96,34 +96,7 @@ $phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
$phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));
-// 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');
-$phpbb_subscriber_loader = $phpbb_container->get('event.subscriber_loader');
-
-$template = $phpbb_container->get('template');
+require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx);
// Add own hook handler
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
diff --git a/phpBB/includes/compatibility_globals.php b/phpBB/includes/compatibility_globals.php
new file mode 100644
index 0000000000..fa468ed96a
--- /dev/null
+++ b/phpBB/includes/compatibility_globals.php
@@ -0,0 +1,44 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+*/
+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');
+$phpbb_subscriber_loader = $phpbb_container->get('event.subscriber_loader');
+
+$template = $phpbb_container->get('template');