From 597297b169e2ae14684ad1f40c8e083be22b241d Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Sun, 18 Oct 2015 22:47:04 +0200 Subject: [ticket/14044] Deduplicate the installers PHPBB3-14044 --- phpBB/install/app.php | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 phpBB/install/app.php (limited to 'phpBB/install/app.php') diff --git a/phpBB/install/app.php b/phpBB/install/app.php new file mode 100644 index 0000000000..9346351aba --- /dev/null +++ b/phpBB/install/app.php @@ -0,0 +1,59 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +/** + * @ignore + */ +define('IN_PHPBB', true); +define('IN_INSTALL', true); +define('PHPBB_ENVIRONMENT', 'production'); +$phpbb_root_path = '../'; +$phpEx = substr(strrchr(__FILE__, '.'), 1); + +$startup_new_path = $phpbb_root_path . 'install/update/update/new/install/startup.' . $phpEx; +$startup_path = (file_exists($startup_new_path)) ? $startup_new_path : $phpbb_root_path . 'install/startup.' . $phpEx; +require($startup_path); + +/** @var \phpbb\filesystem\filesystem $phpbb_filesystem */ +$phpbb_filesystem = $phpbb_installer_container->get('filesystem'); + +/** @var \phpbb\template\template $template */ +$template = $phpbb_installer_container->get('template'); + + +// Path to templates +$paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style'); +$paths = array_filter($paths, 'is_dir'); + +$template->set_custom_style(array( + array( + 'name' => 'adm', + 'ext_path' => 'adm/style/', + ), +), $paths); + +/* @var $phpbb_dispatcher \phpbb\event\dispatcher */ +$phpbb_dispatcher = $phpbb_installer_container->get('dispatcher'); + +/** @var \phpbb\language\language $language */ +$language = $phpbb_installer_container->get('language'); +$language->add_lang(array('common', 'acp/common', 'acp/board', 'install', 'posting')); + +/* @var $http_kernel \Symfony\Component\HttpKernel\HttpKernel */ +$http_kernel = $phpbb_installer_container->get('http_kernel'); + +/* @var $symfony_request \phpbb\symfony_request */ +$symfony_request = $phpbb_installer_container->get('symfony_request'); +$response = $http_kernel->handle($symfony_request); +$response->send(); +$http_kernel->terminate($symfony_request, $response); -- cgit v1.2.1 From 8d178f15f06e0f6b5e64447dc07157a796645572 Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Wed, 4 Nov 2015 17:25:38 +0100 Subject: [ticket/14270] Purge cache when the installer is finished PHPBB3-14270 --- phpBB/install/app.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'phpBB/install/app.php') diff --git a/phpBB/install/app.php b/phpBB/install/app.php index 9346351aba..9664f92cf1 100644 --- a/phpBB/install/app.php +++ b/phpBB/install/app.php @@ -30,7 +30,6 @@ $phpbb_filesystem = $phpbb_installer_container->get('filesystem'); /** @var \phpbb\template\template $template */ $template = $phpbb_installer_container->get('template'); - // Path to templates $paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style'); $paths = array_filter($paths, 'is_dir'); @@ -42,17 +41,17 @@ $template->set_custom_style(array( ), ), $paths); -/* @var $phpbb_dispatcher \phpbb\event\dispatcher */ +/** @var $phpbb_dispatcher \phpbb\event\dispatcher */ $phpbb_dispatcher = $phpbb_installer_container->get('dispatcher'); /** @var \phpbb\language\language $language */ $language = $phpbb_installer_container->get('language'); $language->add_lang(array('common', 'acp/common', 'acp/board', 'install', 'posting')); -/* @var $http_kernel \Symfony\Component\HttpKernel\HttpKernel */ +/** @var $http_kernel \Symfony\Component\HttpKernel\HttpKernel */ $http_kernel = $phpbb_installer_container->get('http_kernel'); -/* @var $symfony_request \phpbb\symfony_request */ +/** @var $symfony_request \phpbb\symfony_request */ $symfony_request = $phpbb_installer_container->get('symfony_request'); $response = $http_kernel->handle($symfony_request); $response->send(); -- cgit v1.2.1 From d0724063c4b144902eab36e98b4f0d5cce443152 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 15 Jan 2017 15:51:24 +0100 Subject: [ticket/11076] Also add notice about unsupported version to installer PHPBB3-11076 --- phpBB/install/app.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'phpBB/install/app.php') diff --git a/phpBB/install/app.php b/phpBB/install/app.php index 9664f92cf1..ef59689a65 100644 --- a/phpBB/install/app.php +++ b/phpBB/install/app.php @@ -20,6 +20,11 @@ define('PHPBB_ENVIRONMENT', 'production'); $phpbb_root_path = '../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); +if (version_compare(PHP_VERSION, '5.4') < 0) +{ + die('You are running an unsupported PHP version. Please upgrade to PHP 5.4.0 or higher before trying to install or update to phpBB 3.2'); +} + $startup_new_path = $phpbb_root_path . 'install/update/update/new/install/startup.' . $phpEx; $startup_path = (file_exists($startup_new_path)) ? $startup_new_path : $phpbb_root_path . 'install/startup.' . $phpEx; require($startup_path); -- cgit v1.2.1 From 5949f912ba429c05109c5814f5efc85ff8872d02 Mon Sep 17 00:00:00 2001 From: 3D-I Date: Sat, 5 Jan 2019 01:32:43 +0100 Subject: [ticket/15926] Deny 3.2.x installation if PHP >= 7.3-dev PHPBB3-15926 --- phpBB/install/app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/install/app.php') diff --git a/phpBB/install/app.php b/phpBB/install/app.php index ef59689a65..ef29bd5722 100644 --- a/phpBB/install/app.php +++ b/phpBB/install/app.php @@ -20,9 +20,9 @@ define('PHPBB_ENVIRONMENT', 'production'); $phpbb_root_path = '../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); -if (version_compare(PHP_VERSION, '5.4') < 0) +if ( version_compare(PHP_VERSION, '5.4.7', '<') || version_compare(PHP_VERSION, '7.3-dev', '>=') ) { - die('You are running an unsupported PHP version. Please upgrade to PHP 5.4.0 or higher before trying to install or update to phpBB 3.2'); + die('You are running an unsupported PHP version. Please upgrade to PHP equal or greater than 5.4.7 but less than 7.3-dev in order to install or update to phpBB 3.2'); } $startup_new_path = $phpbb_root_path . 'install/update/update/new/install/startup.' . $phpEx; -- cgit v1.2.1 From 8fa7e18e2bc059f592c4f77d4ad7c3dd2e310fb1 Mon Sep 17 00:00:00 2001 From: 3D-I Date: Sat, 5 Jan 2019 18:35:28 +0100 Subject: [ticket/15926] Deny 3.2.x installation if PHP >= 7.3-dev PHPBB3-15926 --- phpBB/install/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/install/app.php') diff --git a/phpBB/install/app.php b/phpBB/install/app.php index ef29bd5722..b4adf0431a 100644 --- a/phpBB/install/app.php +++ b/phpBB/install/app.php @@ -20,7 +20,7 @@ define('PHPBB_ENVIRONMENT', 'production'); $phpbb_root_path = '../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); -if ( version_compare(PHP_VERSION, '5.4.7', '<') || version_compare(PHP_VERSION, '7.3-dev', '>=') ) +if (version_compare(PHP_VERSION, '5.4.7', '<') || version_compare(PHP_VERSION, '7.3-dev', '>=')) { die('You are running an unsupported PHP version. Please upgrade to PHP equal or greater than 5.4.7 but less than 7.3-dev in order to install or update to phpBB 3.2'); } -- cgit v1.2.1 From a0efae7734dffad160aed7684a3b4072a5dbec69 Mon Sep 17 00:00:00 2001 From: 3D-I Date: Sun, 6 Jan 2019 00:08:49 +0100 Subject: [ticket/15926] Deny 3.2.x installation if PHP >= 7.3-dev PHPBB3-15926 --- phpBB/install/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/install/app.php') diff --git a/phpBB/install/app.php b/phpBB/install/app.php index b4adf0431a..710f49570b 100644 --- a/phpBB/install/app.php +++ b/phpBB/install/app.php @@ -22,7 +22,7 @@ $phpEx = substr(strrchr(__FILE__, '.'), 1); if (version_compare(PHP_VERSION, '5.4.7', '<') || version_compare(PHP_VERSION, '7.3-dev', '>=')) { - die('You are running an unsupported PHP version. Please upgrade to PHP equal or greater than 5.4.7 but less than 7.3-dev in order to install or update to phpBB 3.2'); + die('You are running an unsupported PHP version. Please upgrade to PHP equal to or greater than 5.4.7 but less than 7.3-dev in order to install or update to phpBB 3.2'); } $startup_new_path = $phpbb_root_path . 'install/update/update/new/install/startup.' . $phpEx; -- cgit v1.2.1