aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/installer.php
diff options
context:
space:
mode:
authorCHItA <mate.bartus@gmail.com>2015-06-11 19:32:11 +0200
committerMate Bartus <mate.bartus@gmail.com>2015-07-08 01:28:02 +0200
commitdb4cfa7df62d5911bc5a0edcdc59236c39aede08 (patch)
tree35c6a99c900a0b9a3fa5db0e8d60e39045ed6591 /phpBB/install/installer.php
parent1b81bf5b2370c045a6369705d2a11a2b35fe2281 (diff)
downloadforums-db4cfa7df62d5911bc5a0edcdc59236c39aede08.tar
forums-db4cfa7df62d5911bc5a0edcdc59236c39aede08.tar.gz
forums-db4cfa7df62d5911bc5a0edcdc59236c39aede08.tar.bz2
forums-db4cfa7df62d5911bc5a0edcdc59236c39aede08.tar.xz
forums-db4cfa7df62d5911bc5a0edcdc59236c39aede08.zip
[ticket/13740] Add navigation bar support for the installer
Also added various UI elements and texts. [ci skip] PHPBB3-13740
Diffstat (limited to 'phpBB/install/installer.php')
-rw-r--r--phpBB/install/installer.php34
1 files changed, 31 insertions, 3 deletions
diff --git a/phpBB/install/installer.php b/phpBB/install/installer.php
index 1c7c9c8a92..f5da898a00 100644
--- a/phpBB/install/installer.php
+++ b/phpBB/install/installer.php
@@ -13,6 +13,7 @@
namespace phpbb\install;
+use phpbb\install\exception\installer_config_not_writable_exception;
use phpbb\install\exception\invalid_service_name_exception;
use phpbb\install\exception\module_not_found_exception;
use phpbb\install\exception\task_not_found_exception;
@@ -106,6 +107,10 @@ class installer
// Flag used by exception handling, whether or not we need to flush output buffer once again
$flush_messages = false;
+ // We are installing something, so the introduction stage can go now...
+ $this->install_config->set_finished_navigation_stage(array('install', 0, 'introduction'));
+ $this->iohandler->set_finished_stage_menu(array('install', 0, 'introduction'));
+
try
{
if ($this->install_config->get_task_progress_count() === 0)
@@ -168,6 +173,9 @@ class installer
// Check if module should be executed
if (!$module->is_essential() && !$module->check_requirements())
{
+ $this->install_config->set_finished_navigation_stage($module->get_navigation_stage_path());
+ $this->iohandler->set_finished_stage_menu($module->get_navigation_stage_path());
+
$this->iohandler->add_log_message(array(
'SKIP_MODULE',
$module_service_name,
@@ -176,8 +184,15 @@ class installer
continue;
}
+ // Set the correct stage in the navigation bar
+ $this->install_config->set_active_navigation_stage($module->get_navigation_stage_path());
+ $this->iohandler->set_active_stage_menu($module->get_navigation_stage_path());
+
$module->run();
+ $this->install_config->set_finished_navigation_stage($module->get_navigation_stage_path());
+ $this->iohandler->set_finished_stage_menu($module->get_navigation_stage_path());
+
// Clear task progress
$this->install_config->set_finished_task('', 0);
}
@@ -189,12 +204,12 @@ class installer
}
else
{
- // @todo: Send refresh request
+ $this->iohandler->request_refresh();
}
}
catch (user_interaction_required_exception $e)
{
- // @todo handle exception
+ // Do nothing
}
catch (module_not_found_exception $e)
{
@@ -234,7 +249,20 @@ class installer
}
// Save install progress
- $this->install_config->save_config();
+ try
+ {
+ $this->install_config->save_config();
+ }
+ catch (installer_config_not_writable_exception $e)
+ {
+ // It is allowed to fail this test during requirements testing
+ $progress_data = $this->install_config->get_progress_data();
+
+ if ($progress_data['last_task_module_name'] !== 'installer.module.requirements_install')
+ {
+ $this->iohandler->add_error_message('INSTALLER_CONFIG_NOT_WRITABLE');
+ }
+ }
}
/**