aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/install/module/update_filesystem
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/install/module/update_filesystem')
-rw-r--r--phpBB/phpbb/install/module/update_filesystem/task/file_check.php32
-rw-r--r--phpBB/phpbb/install/module/update_filesystem/task/show_file_status.php2
2 files changed, 33 insertions, 1 deletions
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 f4b3870148..47a71eb844 100644
--- a/phpBB/phpbb/install/module/update_filesystem/task/file_check.php
+++ b/phpBB/phpbb/install/module/update_filesystem/task/file_check.php
@@ -118,6 +118,17 @@ class file_check extends task_base
$this->iohandler->set_task_count($task_count);
$this->iohandler->set_progress('UPDATE_CHECK_FILES', 0);
+ // Create list of default extensions that should have been added prior
+ // to this update
+ $default_update_extensions = [];
+ foreach (\phpbb\install\module\update_database\task\update_extensions::$default_extensions_update as $version => $extensions)
+ {
+ if ($this->update_helper->phpbb_version_compare($update_info['version']['from'], $version, '>='))
+ {
+ $default_update_extensions = array_merge($default_update_extensions, $extensions);
+ }
+ }
+
foreach ($update_info['files'] as $key => $filename)
{
$old_file = $old_path . $filename;
@@ -138,6 +149,27 @@ class file_check extends task_base
$progress_count++;
$this->iohandler->set_progress('UPDATE_CHECK_FILES', $progress_count);
+ // Do not copy default extension again if the previous version was
+ // packaged with it but it does not exist (e.g. deleted by admin)
+ if (strpos($file, $this->phpbb_root_path . 'ext/') !== false)
+ {
+ $skip_file = false;
+ foreach ($default_update_extensions as $ext_name)
+ {
+ if (strpos($file, $this->phpbb_root_path . 'ext/' . $ext_name) !== false &&
+ !$this->filesystem->exists($this->phpbb_root_path . 'ext/' . $ext_name . '/composer.json'))
+ {
+ $skip_file = true;
+ break;
+ }
+ }
+
+ if ($skip_file)
+ {
+ continue;
+ }
+ }
+
if (!$this->filesystem->exists($file))
{
$file_update_info['new'][] = $filename;
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 7f18950cf6..cf1e4cf4ac 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
@@ -92,7 +92,7 @@ class show_file_status extends task_base
// Create archive for merge conflicts
if (!empty($merge_conflicts))
{
- $compression_method = $this->installer_config->get('compression_method', '');
+ $compression_method = $this->installer_config->get('file_update_compression', '');
$conflict_archive = $this->file_updater->init($compression_method);
$this->installer_config->set('update_file_conflict_archive', $conflict_archive);