From 3278ff03e7809dd0bb31771b3928e8676a09c572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Bartus?= Date: Sun, 27 Mar 2016 18:25:06 +0200 Subject: [PATCH] [ticket/14393] Fix updater behaviour PHPBB3-14393 --- .../install/module/update_database/task/update.php | 2 +- .../module/update_filesystem/task/file_check.php | 1 + .../module/update_filesystem/task/show_file_status.php | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/phpBB/phpbb/install/module/update_database/task/update.php b/phpBB/phpbb/install/module/update_database/task/update.php index 4b2baf2c23..d8807951d1 100644 --- a/phpBB/phpbb/install/module/update_database/task/update.php +++ b/phpBB/phpbb/install/module/update_database/task/update.php @@ -183,7 +183,7 @@ class update extends task_base ); } - $this->iohandler->finish_progress('INLINE_UPDATE_SUCCESSFUL'); + $this->iohandler->set_progress('INLINE_UPDATE_SUCCESSFUL', $migration_count); $this->iohandler->add_success_message('INLINE_UPDATE_SUCCESSFUL'); 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..329e6b9315 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 @@ -140,10 +140,14 @@ class show_file_status extends task_base } else { + $this->file_updater->close(); + $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); }