diff options
author | Nils Adermann <naderman@naderman.de> | 2013-09-10 14:01:09 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2013-09-16 00:25:27 +0200 |
commit | b95fdacdd378877d277e261465da73deb06e50da (patch) | |
tree | 01d55340b37f412cecd2d898c302e101b8a0ed19 /phpBB/install | |
parent | 196e1813cd37c47965eb6f254ce6a55210a1b751 (diff) | |
download | forums-b95fdacdd378877d277e261465da73deb06e50da.tar forums-b95fdacdd378877d277e261465da73deb06e50da.tar.gz forums-b95fdacdd378877d277e261465da73deb06e50da.tar.bz2 forums-b95fdacdd378877d277e261465da73deb06e50da.tar.xz forums-b95fdacdd378877d277e261465da73deb06e50da.zip |
[ticket/11700] Move all recent code to namespaces
PHPBB3-11700
Diffstat (limited to 'phpBB/install')
-rw-r--r-- | phpBB/install/database_update.php | 12 | ||||
-rw-r--r-- | phpBB/install/index.php | 18 | ||||
-rw-r--r-- | phpBB/install/install_convert.php | 8 | ||||
-rw-r--r-- | phpBB/install/install_install.php | 14 | ||||
-rw-r--r-- | phpBB/install/install_update.php | 6 |
5 files changed, 29 insertions, 29 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 19db0a9fc1..74106ca31f 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -95,17 +95,17 @@ 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(); // Set up container (must be done here because extensions table may not exist) $container_extensions = array( - new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx), - new phpbb_di_extension_core($phpbb_root_path), + new \phpbb\di\extension\config($phpbb_root_path . 'config.' . $phpEx), + new \phpbb\di\extension\core($phpbb_root_path), ); $container_passes = array( - new phpbb_di_pass_collection_pass(), - //new phpbb_di_pass_kernel_pass(), + new \phpbb\di\pass\collection_pass(), + //new \phpbb\di\pass\kernel_pass(), ); $phpbb_container = phpbb_create_container($container_extensions, $phpbb_root_path, $phpEx); @@ -230,7 +230,7 @@ while (!$migrator->finished()) { $migrator->update(); } - catch (phpbb_db_migration_exception $e) + catch (\phpbb\db\migration\exception $e) { echo $e->getLocalisedMessage($user); diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 65f33766b5..b01dfa61ed 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -90,9 +90,9 @@ include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); require($phpbb_root_path . 'includes/functions_install.' . $phpEx); // 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_ext_', "{$phpbb_root_path}ext/", $phpEx); $phpbb_class_loader_ext->register(); // Set up container @@ -187,8 +187,8 @@ $sub = request_var('sub', ''); // Set PHP error handler to ours set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler'); -$user = new phpbb_user(); -$auth = new phpbb_auth(); +$user = new \phpbb\user(); +$auth = new \phpbb\auth\auth(); // Add own hook handler, if present. :o if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx)) @@ -208,14 +208,14 @@ else } // Set some standard variables we want to force -$config = new phpbb_config(array( +$config = new \phpbb\config\config(array( 'load_tplcompile' => '1' )); -$phpbb_style_resource_locator = new phpbb_style_resource_locator(); -$phpbb_style_path_provider = new phpbb_style_path_provider(); -$template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $user, new phpbb_template_context()); -$phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template); +$phpbb_style_resource_locator = new \phpbb\style\resource_locator(); +$phpbb_style_path_provider = new \phpbb\style\path_provider(); +$template = new \phpbb\template\twig\twig($phpbb_root_path, $phpEx, $config, $user, new \phpbb\template\context()); +$phpbb_style = new \phpbb\style\style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template); $phpbb_style->set_ext_dir_prefix('adm/'); $phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), ''); $template->assign_var('T_ASSETS_PATH', '../assets'); diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 8a8c440036..4d3e1d3d4a 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -130,7 +130,7 @@ class install_convert extends module unset($dbpasswd); // We need to fill the config to let internal functions correctly work - $config = new phpbb_config_db($db, new phpbb_cache_driver_null, CONFIG_TABLE); + $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE); set_config(null, null, null, $config); set_config_count(null, null, null, $config); @@ -345,7 +345,7 @@ class install_convert extends module $this->page_title = $lang['STAGE_SETTINGS']; // We need to fill the config to let internal functions correctly work - $config = new phpbb_config_db($db, new phpbb_cache_driver_null, CONFIG_TABLE); + $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE); set_config(null, null, null, $config); set_config_count(null, null, null, $config); @@ -586,7 +586,7 @@ class install_convert extends module unset($dbpasswd); // We need to fill the config to let internal functions correctly work - $config = new phpbb_config_db($db, new phpbb_cache_driver_null, CONFIG_TABLE); + $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE); set_config(null, null, null, $config); set_config_count(null, null, null, $config); @@ -739,7 +739,7 @@ class install_convert extends module // For conversions we are a bit less strict and set to a search backend we know exist... if (!class_exists($search_type)) { - $search_type = 'phpbb_search_fulltext_native'; + $search_type = '\phpbb\search\fulltext_native'; set_config('search_type', $search_type); } diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index ea23c318e3..107da0f90a 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -102,7 +102,7 @@ class install_install extends module break; case 'final': - // Enable super globals to prevent issues with the new phpbb_request object + // Enable super globals to prevent issues with the new \phpbb\request\request object $request->enable_super_globals(); // Create a normal container now @@ -1438,12 +1438,12 @@ class install_install extends module include_once($phpbb_root_path . 'phpbb/search/fulltext_native.' . $phpEx); // We need to fill the config to let internal functions correctly work - $config = new phpbb_config_db($db, new phpbb_cache_driver_null, CONFIG_TABLE); + $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE); set_config(null, null, null, $config); set_config_count(null, null, null, $config); $error = false; - $search = new phpbb_search_fulltext_native($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user); + $search = new \phpbb\search\fulltext_native($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user); $sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id FROM ' . POSTS_TABLE; @@ -1753,7 +1753,7 @@ class install_install extends module $data = $this->get_submitted_data(); // We need to fill the config to let internal functions correctly work - $config = new phpbb_config_db($db, new phpbb_cache_driver_null, CONFIG_TABLE); + $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE); set_config(null, null, null, $config); set_config_count(null, null, null, $config); @@ -1827,7 +1827,7 @@ class install_install extends module $data = $this->get_submitted_data(); // We need to fill the config to let internal functions correctly work - $config = new phpbb_config_db($db, new phpbb_cache_driver_null, CONFIG_TABLE); + $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE); set_config(null, null, null, $config); set_config_count(null, null, null, $config); @@ -1892,8 +1892,8 @@ class install_install extends module * "installs" means it adds all migrations to the migrations table, but does not * perform any of the actions in the migrations. * - * @param phpbb_extension_manager $extension_manager - * @param phpbb_db_migrator $migrator + * @param \phpbb\extension\manager $extension_manager + * @param \phpbb\db\migrator $migrator */ function populate_migrations($extension_manager, $migrator) { diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 2d165b551a..b61ee277b4 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -108,7 +108,7 @@ class install_update extends module unset($dbpasswd); // We need to fill the config to let internal functions correctly work - $config = new phpbb_config_db($db, new phpbb_cache_driver_null, CONFIG_TABLE); + $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE); set_config(null, null, null, $config); set_config_count(null, null, null, $config); @@ -248,7 +248,7 @@ class install_update extends module $this->include_file('includes/diff/renderer.' . $phpEx); // Make sure we stay at the file check if checking the files again - if ($request->variable('check_again', false, false, phpbb_request_request_interface::POST)) + if ($request->variable('check_again', false, false, \phpbb\request\request_interface::POST)) { $sub = $this->p_master->sub = 'file_check'; } @@ -355,7 +355,7 @@ class install_update extends module $action = request_var('action', ''); // We are directly within an update. To make sure our update list is correct we check its status. - $update_list = ($request->variable('check_again', false, false, phpbb_request_request_interface::POST)) ? false : $cache->get('_update_list'); + $update_list = ($request->variable('check_again', false, false, \phpbb\request\request_interface::POST)) ? false : $cache->get('_update_list'); $modified = ($update_list !== false) ? @filemtime($cache->get_driver()->cache_dir . 'data_update_list.' . $phpEx) : 0; // Make sure the list is up-to-date |