mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.2.x'
* 3.2.x: [ticket/14393] Fix db update progress bar [ticket/14393] Fix init for conflict archive [ticket/14393] Fix updater behaviour
This commit is contained in:
commit
49c3da0cb9
3 changed files with 14 additions and 11 deletions
|
@ -142,6 +142,7 @@ class update extends task_base
|
||||||
$this->migrator->set_migrations($migrations);
|
$this->migrator->set_migrations($migrations);
|
||||||
$migration_count = count($this->migrator->get_migrations());
|
$migration_count = count($this->migrator->get_migrations());
|
||||||
$this->iohandler->set_task_count($migration_count, true);
|
$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);
|
$progress_count = $this->installer_config->get('database_update_count', 0);
|
||||||
|
|
||||||
while (!$this->migrator->finished())
|
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->iohandler->add_success_message('INLINE_UPDATE_SUCCESSFUL');
|
||||||
|
|
||||||
$this->config->delete('version_update_from');
|
$this->config->delete('version_update_from');
|
||||||
|
|
|
@ -166,6 +166,7 @@ class file_check extends task_base
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->installer_config->set('update_files', $file_update_info);
|
$this->installer_config->set('update_files', $file_update_info);
|
||||||
|
$this->installer_config->set('update_info', array());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -66,11 +66,7 @@ class show_file_status extends task_base
|
||||||
$this->cache = $container->get('cache.driver');
|
$this->cache = $container->get('cache.driver');
|
||||||
|
|
||||||
// Initialize compression file updater
|
// Initialize compression file updater
|
||||||
$compression_method = $this->installer_config->get('compression_method', '');
|
|
||||||
$this->file_updater = $file_updater_factory->get('compression');
|
$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);
|
parent::__construct(false);
|
||||||
}
|
}
|
||||||
|
@ -96,6 +92,10 @@ class show_file_status extends task_base
|
||||||
// Create archive for merge conflicts
|
// Create archive for merge conflicts
|
||||||
if (!empty($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)
|
foreach ($merge_conflicts as $filename)
|
||||||
{
|
{
|
||||||
$this->file_updater->create_new_file(
|
$this->file_updater->create_new_file(
|
||||||
|
@ -111,9 +111,9 @@ class show_file_status extends task_base
|
||||||
'DOWNLOAD_CONFLICTS',
|
'DOWNLOAD_CONFLICTS',
|
||||||
'DOWNLOAD_CONFLICTS_EXPLAIN'
|
'DOWNLOAD_CONFLICTS_EXPLAIN'
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
$this->file_updater->close();
|
$this->file_updater->close();
|
||||||
|
}
|
||||||
|
|
||||||
// Render update file statuses
|
// Render update file statuses
|
||||||
$file_update_info = $this->installer_config->get('update_files', array());
|
$file_update_info = $this->installer_config->get('update_files', array());
|
||||||
|
@ -140,10 +140,13 @@ class show_file_status extends task_base
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$conflict_archive_path = $this->installer_config->get('update_file_conflict_archive', null);
|
||||||
|
|
||||||
// Remove archive
|
// Remove archive
|
||||||
$this->filesystem->remove(
|
if ($conflict_archive_path !== null && $this->filesystem->exists($conflict_archive_path))
|
||||||
$this->installer_config->get('update_file_conflict_archive', null)
|
{
|
||||||
);
|
$this->filesystem->remove($conflict_archive_path);
|
||||||
|
}
|
||||||
|
|
||||||
$this->installer_config->set('update_file_conflict_archive', null);
|
$this->installer_config->set('update_file_conflict_archive', null);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue