diff options
Diffstat (limited to 'phpBB/common.php')
| -rw-r--r-- | phpBB/common.php | 25 | 
1 files changed, 20 insertions, 5 deletions
| diff --git a/phpBB/common.php b/phpBB/common.php index 962a1f951f..80375f7a9c 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -47,7 +47,19 @@ if (!defined('PHPBB_INSTALLED'))  	// Eliminate . and .. from the path  	require($phpbb_root_path . 'phpbb/filesystem.' . $phpEx); -	$phpbb_filesystem = new phpbb_filesystem(); +	require($phpbb_root_path . 'phpbb/symfony_request.' . $phpEx); +	require($phpbb_root_path . 'phpbb/request/deactivated_super_global.' . $phpEx); +	require($phpbb_root_path . 'phpbb/request/type_cast_helper_interface.' . $phpEx); +	require($phpbb_root_path . 'phpbb/request/type_cast_helper.' . $phpEx); +	require($phpbb_root_path . 'phpbb/request/request_interface.' . $phpEx); +	require($phpbb_root_path . 'phpbb/request/request.' . $phpEx); +	$phpbb_filesystem = new phpbb\filesystem( +		new phpbb\symfony_request( +			new phpbb\request\request() +		), +		$phpbb_root_path, +		$phpEx +	);  	$script_path = $phpbb_filesystem->clean_path($script_path);  	$url = (($secure) ? 'https://' : 'http://') . $server_name; @@ -85,9 +97,9 @@ require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);  set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');  // Setup class loader first -$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}phpbb/", $phpEx); +$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);  $phpbb_class_loader->register(); -$phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_path}ext/", $phpEx); +$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);  $phpbb_class_loader_ext->register();  // Set up container @@ -109,6 +121,10 @@ $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 +// Create a Symfony Request object from our phpbb_request object +$symfony_request = $phpbb_container->get('symfony_request'); +$phpbb_filesystem = $phpbb_container->get('filesystem'); +  // Grab global variables, re-cache if necessary  $config = $phpbb_container->get('config');  set_config(null, null, null, $config); @@ -121,11 +137,10 @@ $phpbb_extension_manager = $phpbb_container->get('ext.manager');  $phpbb_subscriber_loader = $phpbb_container->get('event.subscriber_loader');  $template = $phpbb_container->get('template'); -$phpbb_style = $phpbb_container->get('style');  // Add own hook handler  require($phpbb_root_path . 'includes/hooks/index.' . $phpEx); -$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('phpbb_template', 'display'))); +$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('\phpbb\template\template', 'display')));  $phpbb_hook_finder = $phpbb_container->get('hook_finder');  foreach ($phpbb_hook_finder->find() as $hook) | 
