diff options
author | Mate Bartus <mate.bartus@gmail.com> | 2015-07-24 09:20:50 +0200 |
---|---|---|
committer | Mate Bartus <mate.bartus@gmail.com> | 2015-10-17 23:05:57 +0200 |
commit | 8f5a0ad6f73e7b7757b02c827436384c96069b5a (patch) | |
tree | 87a16ddaa2f645d62728f0b4543199e43995bfeb /phpBB/phpbb/install/installer.php | |
parent | f1047ac854baba4d1015cd9a555a523b3860f2c9 (diff) | |
download | forums-8f5a0ad6f73e7b7757b02c827436384c96069b5a.tar forums-8f5a0ad6f73e7b7757b02c827436384c96069b5a.tar.gz forums-8f5a0ad6f73e7b7757b02c827436384c96069b5a.tar.bz2 forums-8f5a0ad6f73e7b7757b02c827436384c96069b5a.tar.xz forums-8f5a0ad6f73e7b7757b02c827436384c96069b5a.zip |
[ticket/14039] Revamp updater
PHPBB3-14039
Diffstat (limited to 'phpBB/phpbb/install/installer.php')
-rw-r--r-- | phpBB/phpbb/install/installer.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/phpBB/phpbb/install/installer.php b/phpBB/phpbb/install/installer.php index 755edb5297..8a0374b1f0 100644 --- a/phpBB/phpbb/install/installer.php +++ b/phpBB/phpbb/install/installer.php @@ -15,6 +15,7 @@ namespace phpbb\install; use phpbb\di\ordered_service_collection; use phpbb\install\exception\installer_config_not_writable_exception; +use phpbb\install\exception\jump_to_restart_point_exception; use phpbb\install\exception\resource_limit_reached_exception; use phpbb\install\exception\user_interaction_required_exception; use phpbb\install\helper\config; @@ -94,6 +95,7 @@ class installer // Variable used to check if the install process have been finished $install_finished = false; $fail_cleanup = false; + $send_refresh = false; // We are installing something, so the introduction stage can go now... $this->install_config->set_finished_navigation_stage(array('install', 0, 'introduction')); @@ -142,7 +144,7 @@ class installer $this->install_config->set_active_module($name); // Run until there are available resources - if ($this->install_config->get_time_remaining() <= 0 && $this->install_config->get_memory_remaining() <= 0) + if ($this->install_config->get_time_remaining() <= 0 || $this->install_config->get_memory_remaining() <= 0) { throw new resource_limit_reached_exception(); } @@ -208,7 +210,12 @@ class installer } catch (resource_limit_reached_exception $e) { - // Do nothing + $send_refresh = true; + } + catch (jump_to_restart_point_exception $e) + { + $this->install_config->jump_to_restart_point($e->get_restart_point_name()); + $send_refresh = true; } catch (\Exception $e) { @@ -222,9 +229,10 @@ class installer // Send install finished message $this->iohandler->set_progress('INSTALLER_FINISHED', $this->install_config->get_task_progress_count()); } - else if (!$fail_cleanup) + else if ($send_refresh) { $this->iohandler->request_refresh(); + $this->iohandler->send_response(); } // Save install progress |