aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install_new/phpbbcli.php
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-19 14:43:48 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-19 14:43:48 +0200
commit5b3829aab45d4eb53207c1153fc7c71c72f0f83c (patch)
treeceb2251546de94d432fa6160e2e6c80a8a2b50fb /phpBB/install_new/phpbbcli.php
parent9ea44abf38f81c696163f45b074c87175c240b69 (diff)
parentd45f146814a1709a16fb8e4951374242d50b6aed (diff)
downloadforums-5b3829aab45d4eb53207c1153fc7c71c72f0f83c.tar
forums-5b3829aab45d4eb53207c1153fc7c71c72f0f83c.tar.gz
forums-5b3829aab45d4eb53207c1153fc7c71c72f0f83c.tar.bz2
forums-5b3829aab45d4eb53207c1153fc7c71c72f0f83c.tar.xz
forums-5b3829aab45d4eb53207c1153fc7c71c72f0f83c.zip
Merge pull request #3794 from CHItA/ticket/14039
[ticket/14039] Refactoring the updater * CHItA/ticket/14039: [ticket/14039] Use update helper to include files in container factory [ticket/14039] Fix inclusion logic in update helper [ticket/14039] Fix folder creation and deleted binary file issue [ticket/14039] Fix file check for deleted files [ticket/14039] Fix acp link [ticket/14039] Fix ACP link generation [ticket/14039] Fix constants for the updater [ticket/14039] Include phpBB constants on startup [ticket/14039] Fix migrator's language calls [ticket/14039] Fix misunderstandable comment in the archive file updater [ticket/14039] Use shared language service in the container factory [ticket/14039] Fix filesystem file updater's mkdir usage [ticket/14039] Only show log container when it has content [ticket/14039] Use compatibility globals from the update package [ticket/14039] Use http_exception instead of die() [ticket/14039] Fix T_TEMPLATE_PATH constant [ticket/14039] Fix language constants and comments [ticket/14039] Revamp updater
Diffstat (limited to 'phpBB/install_new/phpbbcli.php')
-rw-r--r--phpBB/install_new/phpbbcli.php29
1 files changed, 3 insertions, 26 deletions
diff --git a/phpBB/install_new/phpbbcli.php b/phpBB/install_new/phpbbcli.php
index c1e9a9eaef..49a2920900 100644
--- a/phpBB/install_new/phpbbcli.php
+++ b/phpBB/install_new/phpbbcli.php
@@ -27,32 +27,9 @@ $phpEx = substr(strrchr(__FILE__, '.'), 1);
//
// Let's do the common.php logic
//
-require($phpbb_root_path . 'includes/startup.' . $phpEx);
-require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
-
-$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
-$phpbb_class_loader->register();
-
-// In case $phpbb_adm_relative_path is not set (in case of an update), use the default.
-$phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relative_path : 'adm/';
-$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
-
-// Include files
-require($phpbb_root_path . 'includes/functions.' . $phpEx);
-require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
-include($phpbb_root_path . 'includes/functions_compatibility.' . $phpEx);
-require($phpbb_root_path . 'includes/functions_user.' . $phpEx);
-require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
-
-// Set PHP error handler to ours
-set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
-
-$phpbb_installer_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx);
-$phpbb_installer_container = $phpbb_installer_container_builder
- ->with_environment('installer')
- ->without_extensions()
- ->without_cache()
- ->get_container();
+$startup_new_path = $phpbb_root_path . 'install/update/update/new/install_new/startup.' . $phpEx;
+$startup_path = (file_exists($startup_new_path)) ? $startup_new_path : $phpbb_root_path . 'install_new/startup.' . $phpEx;
+require($startup_path);
/** @var \phpbb\filesystem\filesystem $phpbb_filesystem */
$phpbb_filesystem = $phpbb_installer_container->get('filesystem');