aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-07-14 08:20:14 -0700
committerJoas Schilling <nickvergessen@gmx.de>2013-07-14 08:20:14 -0700
commitfa3cdb6bf2cfdca9c26168bd258752718bc8a43f (patch)
treeb3576fc17448f058122d52a9540e0d54beaac4f9 /phpBB/install
parent51ab2c710e91d98bb182dded1e9d5462451151e8 (diff)
parente6e2a50062eca8b640822b8f616ea4bb23b23566 (diff)
downloadforums-fa3cdb6bf2cfdca9c26168bd258752718bc8a43f.tar
forums-fa3cdb6bf2cfdca9c26168bd258752718bc8a43f.tar.gz
forums-fa3cdb6bf2cfdca9c26168bd258752718bc8a43f.tar.bz2
forums-fa3cdb6bf2cfdca9c26168bd258752718bc8a43f.tar.xz
forums-fa3cdb6bf2cfdca9c26168bd258752718bc8a43f.zip
Merge pull request #7 from igorw/ticket/11574
[ticket/11574] Fix various path issues in the updater
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/database_update.php8
-rw-r--r--phpBB/install/index.php2
-rw-r--r--phpBB/install/install_update.php28
3 files changed, 7 insertions, 31 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index b0e28958ac..e0ecc242e1 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -25,7 +25,7 @@ if (!function_exists('phpbb_require_updated'))
{
function phpbb_require_updated($path, $optional = false)
{
- global $phpbb_root_path;
+ global $phpbb_root_path, $table_prefix;
$new_path = $phpbb_root_path . 'install/update/new/' . $path;
$old_path = $phpbb_root_path . $path;
@@ -108,6 +108,7 @@ phpbb_require_updated('includes/functions.' . $phpEx);
phpbb_require_updated('includes/functions_content.' . $phpEx);
phpbb_require_updated('includes/functions_container.' . $phpEx);
+require($phpbb_root_path . 'config.' . $phpEx);
phpbb_require_updated('includes/constants.' . $phpEx);
phpbb_require_updated('includes/utf/utf_tools.' . $phpEx);
@@ -121,8 +122,8 @@ $phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}includ
$phpbb_class_loader->register();
// Set up container (must be done here because extensions table may not exist)
-$other_config_path = $phpbb_root_path . 'install/update/new/config';
-$config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path;
+$other_config_path = $phpbb_root_path . 'install/update/new/config/';
+$config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path . 'config/';
$container_extensions = array(
new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx),
@@ -130,7 +131,6 @@ $container_extensions = array(
);
$container_passes = array(
new phpbb_di_pass_collection_pass(),
- //new phpbb_di_pass_kernel_pass(),
);
$phpbb_container = phpbb_create_container($container_extensions, $phpbb_root_path, $phpEx);
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 4051a5a08b..055fb72d7c 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -28,7 +28,7 @@ if (version_compare(PHP_VERSION, '5.3.3') < 0)
function phpbb_require_updated($path, $optional = false)
{
- global $phpbb_root_path;
+ global $phpbb_root_path, $table_prefix;
$new_path = $phpbb_root_path . 'install/update/new/' . $path;
$old_path = $phpbb_root_path . $path;
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index 38d9f66629..f9dfaaef50 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -75,7 +75,7 @@ class install_update extends module
global $request, $phpbb_admin_path, $phpbb_adm_relative_path, $phpbb_container;
// Create a normal container now
- $phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
+ $phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, $phpbb_root_path . 'install/update/new/config');
// Writes into global $cache
$cache = $phpbb_container->get('cache');
@@ -125,7 +125,7 @@ class install_update extends module
$config['default_lang'] = $language;
$user->data['user_lang'] = $language;
- $user->setup(array('common', 'acp/common', 'acp/board', 'install', 'posting'));
+ $user->add_lang(array('common', 'acp/common', 'acp/board', 'install', 'posting'));
// Reset the default_lang
$config['default_lang'] = $config_default_lang;
@@ -302,30 +302,6 @@ class install_update extends module
break;
case 'update_db':
-
- // Make sure the database update is valid for the latest version
- $valid = false;
- $updates_to_version = '';
-
- if (file_exists($phpbb_root_path . 'install/database_update.' . $phpEx))
- {
- include_once($phpbb_root_path . 'install/database_update.' . $phpEx);
-
- if ($updates_to_version === $this->update_info['version']['to'])
- {
- $valid = true;
- }
- }
-
- // Should not happen at all
- if (!$valid)
- {
- trigger_error($user->lang['DATABASE_UPDATE_INFO_OLD'], E_USER_ERROR);
- }
-
- // Just a precaution
- $cache->purge();
-
// Redirect the user to the database update script with some explanations...
$template->assign_vars(array(
'S_DB_UPDATE' => true,