1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 02:06:32 +02:00

[ticket/13740] Add backend support for install progress tracking

PHPBB3-13740
This commit is contained in:
MateBartus
2015-06-02 21:56:27 +02:00
committed by Mate Bartus
parent 4df89d8848
commit 37b0134aa4
24 changed files with 306 additions and 22 deletions

View File

@@ -110,8 +110,15 @@ abstract class module_base implements module_interface
/** @var \phpbb\install\task_interface $task */
$task = $this->container->get($this->task_collection[$task_index]);
// Send progress information
$this->iohandler->set_progress(
$task->get_task_lang_name(),
$this->install_config->get_current_task_progress()
);
// Iterate to the next task
$task_index++;
$this->install_config->increment_current_task_progress();
// Check if we can run the task
if (!$task->is_essential() && !$task->check_requirements())
@@ -121,11 +128,11 @@ abstract class module_base implements module_interface
$task->run();
// Increment progress
if ($this->get_task_count() !== 0)
{
//$this->iohandler->increment_progress();
}
// Send progress info
$this->iohandler->set_progress(
$task->get_task_lang_name(),
$this->install_config->get_current_task_progress()
);
$this->iohandler->send_response();