diff options
Diffstat (limited to 'phpBB/phpbb/install')
7 files changed, 32 insertions, 15 deletions
diff --git a/phpBB/phpbb/install/helper/container_factory.php b/phpBB/phpbb/install/helper/container_factory.php index 5cf4f8a283..9e372fecde 100644 --- a/phpBB/phpbb/install/helper/container_factory.php +++ b/phpBB/phpbb/install/helper/container_factory.php @@ -183,6 +183,9 @@ class container_factory // Get compatibilty globals and constants $this->update_helper->include_file('includes/compatibility_globals.' . $this->php_ext); + + register_compatibility_globals(); + $this->update_helper->include_file('includes/constants.' . $this->php_ext); } } diff --git a/phpBB/phpbb/install/module/install_database/task/add_config_settings.php b/phpBB/phpbb/install/module/install_database/task/add_config_settings.php index 20b7679ec1..7a2df01de6 100644 --- a/phpBB/phpbb/install/module/install_database/task/add_config_settings.php +++ b/phpBB/phpbb/install/module/install_database/task/add_config_settings.php @@ -129,12 +129,19 @@ class add_config_settings extends \phpbb\install\task_base $this->db->sql_return_on_error(true); $server_name = $this->install_config->get('server_name'); - $cookie_domain = $this->install_config->get('cookie_domain'); $current_time = time(); $user_ip = phpbb_ip_normalise($this->iohandler->get_server_variable('REMOTE_ADDR')); $user_ip = ($user_ip === false) ? '' : $user_ip; $referer = $this->iohandler->get_server_variable('REFERER'); + // Calculate cookie domain + $cookie_domain = $server_name; + + if (strpos($cookie_domain, 'www.') === 0) + { + $cookie_domain = substr($cookie_domain, 3); + } + // Set default config and post data, this applies to all DB's $sql_ary = array( 'INSERT INTO ' . $this->config_table . " (config_name, config_value) diff --git a/phpBB/phpbb/install/module/requirements/task/check_filesystem.php b/phpBB/phpbb/install/module/requirements/task/check_filesystem.php index 2aec3915e0..868af39433 100644 --- a/phpBB/phpbb/install/module/requirements/task/check_filesystem.php +++ b/phpBB/phpbb/install/module/requirements/task/check_filesystem.php @@ -177,7 +177,9 @@ class check_filesystem extends \phpbb\install\task_base if (!($exists && $writable)) { $title = ($exists) ? 'FILE_NOT_WRITABLE' : 'FILE_NOT_EXISTS'; - $description = array($title . '_EXPLAIN', $file); + $lang_suffix = '_EXPLAIN'; + $lang_suffix .= ($failable) ? '_OPTIONAL' : ''; + $description = array($title . $lang_suffix, $file); if ($failable) { @@ -244,7 +246,9 @@ class check_filesystem extends \phpbb\install\task_base if (!($exists && $writable)) { $title = ($exists) ? 'DIRECTORY_NOT_WRITABLE' : 'DIRECTORY_NOT_EXISTS'; - $description = array($title . '_EXPLAIN', $dir); + $lang_suffix = '_EXPLAIN'; + $lang_suffix .= ($failable) ? '_OPTIONAL' : ''; + $description = array($title . $lang_suffix, $dir); if ($failable) { diff --git a/phpBB/phpbb/install/module/update_database/task/update.php b/phpBB/phpbb/install/module/update_database/task/update.php index 4b2baf2c23..9fed2317e9 100644 --- a/phpBB/phpbb/install/module/update_database/task/update.php +++ b/phpBB/phpbb/install/module/update_database/task/update.php @@ -142,6 +142,7 @@ class update extends task_base $this->migrator->set_migrations($migrations); $migration_count = count($this->migrator->get_migrations()); $this->iohandler->set_task_count($migration_count, true); + $this->installer_config->set_task_progress_count($migration_count); $progress_count = $this->installer_config->get('database_update_count', 0); while (!$this->migrator->finished()) @@ -183,8 +184,6 @@ class update extends task_base ); } - $this->iohandler->finish_progress('INLINE_UPDATE_SUCCESSFUL'); - $this->iohandler->add_success_message('INLINE_UPDATE_SUCCESSFUL'); $this->config->delete('version_update_from'); diff --git a/phpBB/phpbb/install/module/update_filesystem/task/file_check.php b/phpBB/phpbb/install/module/update_filesystem/task/file_check.php index 5dbee6c259..f4b3870148 100644 --- a/phpBB/phpbb/install/module/update_filesystem/task/file_check.php +++ b/phpBB/phpbb/install/module/update_filesystem/task/file_check.php @@ -166,6 +166,7 @@ class file_check extends task_base } $this->installer_config->set('update_files', $file_update_info); + $this->installer_config->set('update_info', array()); } /** diff --git a/phpBB/phpbb/install/module/update_filesystem/task/show_file_status.php b/phpBB/phpbb/install/module/update_filesystem/task/show_file_status.php index c46c05500a..7f18950cf6 100644 --- a/phpBB/phpbb/install/module/update_filesystem/task/show_file_status.php +++ b/phpBB/phpbb/install/module/update_filesystem/task/show_file_status.php @@ -66,11 +66,7 @@ class show_file_status extends task_base $this->cache = $container->get('cache.driver'); // Initialize compression file updater - $compression_method = $this->installer_config->get('compression_method', ''); $this->file_updater = $file_updater_factory->get('compression'); - $conflict_archive = $this->file_updater->init($compression_method); - - $this->installer_config->set('update_file_conflict_archive', $conflict_archive); parent::__construct(false); } @@ -96,6 +92,10 @@ class show_file_status extends task_base // Create archive for merge conflicts if (!empty($merge_conflicts)) { + $compression_method = $this->installer_config->get('compression_method', ''); + $conflict_archive = $this->file_updater->init($compression_method); + $this->installer_config->set('update_file_conflict_archive', $conflict_archive); + foreach ($merge_conflicts as $filename) { $this->file_updater->create_new_file( @@ -111,9 +111,9 @@ class show_file_status extends task_base 'DOWNLOAD_CONFLICTS', 'DOWNLOAD_CONFLICTS_EXPLAIN' ); - } - $this->file_updater->close(); + $this->file_updater->close(); + } // Render update file statuses $file_update_info = $this->installer_config->get('update_files', array()); @@ -140,10 +140,13 @@ class show_file_status extends task_base } else { + $conflict_archive_path = $this->installer_config->get('update_file_conflict_archive', null); + // Remove archive - $this->filesystem->remove( - $this->installer_config->get('update_file_conflict_archive', null) - ); + if ($conflict_archive_path !== null && $this->filesystem->exists($conflict_archive_path)) + { + $this->filesystem->remove($conflict_archive_path); + } $this->installer_config->set('update_file_conflict_archive', null); } diff --git a/phpBB/phpbb/install/module_base.php b/phpBB/phpbb/install/module_base.php index 527447b4a1..93c10bd656 100644 --- a/phpBB/phpbb/install/module_base.php +++ b/phpBB/phpbb/install/module_base.php @@ -172,7 +172,7 @@ abstract class module_base implements module_interface $this->iohandler->send_response(); // Stop execution if resource limit is reached - if ($this->install_config->get_time_remaining() <= 0 || $this->install_config->get_memory_remaining() <= 0) + if ($iterator->valid() && ($this->install_config->get_time_remaining() <= 0 || $this->install_config->get_memory_remaining() <= 0)) { throw new resource_limit_reached_exception(); } |