aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2014-10-25 12:09:20 -0700
committerNils Adermann <naderman@naderman.de>2014-10-25 12:09:20 -0700
commit4e952ad4432d237d2212d23e70b1ac264982c30c (patch)
tree8b9d31a37a896cffcaa224e5b387ae186870d9f0 /phpBB/install
parenta43879fe9176a9ed1912a8d087b11db0e39aee83 (diff)
parent078e0c1e440f7f906b670348e8da00141e245876 (diff)
downloadforums-4e952ad4432d237d2212d23e70b1ac264982c30c.tar
forums-4e952ad4432d237d2212d23e70b1ac264982c30c.tar.gz
forums-4e952ad4432d237d2212d23e70b1ac264982c30c.tar.bz2
forums-4e952ad4432d237d2212d23e70b1ac264982c30c.tar.xz
forums-4e952ad4432d237d2212d23e70b1ac264982c30c.zip
Merge commit '078e0c1e440f7f906b670348e8da00141e245876' into prep-release-3.1.0
* commit '078e0c1e440f7f906b670348e8da00141e245876': [ticket/13211] Move console migrator output handler back to console folder [ticket/13211] Also use log wrapper output handler for console migrations [ticket/13211] Move console migrator output handler to db folder [ticket/13211] Add log wrapper for writing database updater to log file [ticket/13126] Add missing use statement [ticket/13126] Fix tests [ticket/13126] Change messages verbosity levels [ticket/13126] Move migrator_output_handler to an interface [ticket/13126] Extends migrator_output_handler instead of using a closure [ticket/13126] Improve the feedback when running the migrations
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/database_update.php26
1 files changed, 2 insertions, 24 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 8016ff349b..80fd40a944 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -174,6 +174,8 @@ define('IN_DB_UPDATE', true);
// End startup code
$migrator = $phpbb_container->get('migrator');
+$migrator->set_output_handler(new \phpbb\db\log_wrapper_migrator_output_handler($user, new \phpbb\db\html_migrator_output_handler($user), $phpbb_root_path . 'store/migrations_' . time() . '.log'));
+
$migrator->create_migrations_table();
$phpbb_extension_manager = $phpbb_container->get('ext.manager');
@@ -199,8 +201,6 @@ $safe_time_limit = min(15, ($phpbb_ini->get_int('max_execution_time') / 2));
while (!$migrator->finished())
{
- $migration_start_time = microtime(true);
-
try
{
$migrator->update();
@@ -219,28 +219,6 @@ while (!$migrator->finished())
$migrator->last_run_migration['state']
);
- if (isset($migrator->last_run_migration['effectively_installed']) && $migrator->last_run_migration['effectively_installed'])
- {
- echo $user->lang('MIGRATION_EFFECTIVELY_INSTALLED', $migrator->last_run_migration['name']);
- }
- else
- {
- if ($migrator->last_run_migration['task'] == 'process_data_step' && $state['migration_data_done'])
- {
- echo $user->lang('MIGRATION_DATA_DONE', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time));
- }
- else if ($migrator->last_run_migration['task'] == 'process_data_step')
- {
- echo $user->lang('MIGRATION_DATA_IN_PROGRESS', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time));
- }
- else if ($state['migration_schema_done'])
- {
- echo $user->lang('MIGRATION_SCHEMA_DONE', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time));
- }
- }
-
- echo "<br />\n";
-
// Are we approaching the time limit? If so we want to pause the update and continue after refreshing
if ((time() - $update_start_time) >= $safe_time_limit)
{