diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2013-03-26 13:18:54 +0100 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2013-03-26 13:18:54 +0100 |
| commit | 34cdbd0360e756a5ef9646554905697f7ae1ba1f (patch) | |
| tree | 58486124738299ef5e8fca3761d4d82189cf41a6 /phpBB/install/database_update.php | |
| parent | f0b0978538a1b1e25b688cce1794c764f2d363f0 (diff) | |
| parent | 8b464e87f0a41422dddaa647ac42ab9c7950bb4b (diff) | |
| download | forums-34cdbd0360e756a5ef9646554905697f7ae1ba1f.tar forums-34cdbd0360e756a5ef9646554905697f7ae1ba1f.tar.gz forums-34cdbd0360e756a5ef9646554905697f7ae1ba1f.tar.bz2 forums-34cdbd0360e756a5ef9646554905697f7ae1ba1f.tar.xz forums-34cdbd0360e756a5ef9646554905697f7ae1ba1f.zip | |
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into ticket/11314
Conflicts:
phpBB/styles/prosilver/template/timezone.js
Diffstat (limited to 'phpBB/install/database_update.php')
| -rw-r--r-- | phpBB/install/database_update.php | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 4938ef0f87..2ecddf49d4 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -123,6 +123,7 @@ $request = $phpbb_container->get('request'); $user = $phpbb_container->get('user'); $auth = $phpbb_container->get('auth'); $db = $phpbb_container->get('dbal.conn'); +$phpbb_log = $phpbb_container->get('log'); // make sure request_var uses this request instance request_var('', 0, false, false, $request); // "dependency injection" for a function @@ -210,7 +211,13 @@ if (!$db_tools->sql_table_exists($table_prefix . 'migrations')) } $migrator = $phpbb_container->get('migrator'); -$migrator->load_migrations($phpbb_root_path . 'includes/db/migration/data/'); +$extension_manager = $phpbb_container->get('ext.manager'); +$finder = $extension_manager->get_finder(); + +$migrations = $finder + ->core_path('includes/db/migration/data/') + ->get_classes(); +$migrator->set_migrations($migrations); // What is a safe limit of execution time? Half the max execution time should be safe. $safe_time_limit = (ini_get('max_execution_time') / 2); @@ -228,7 +235,28 @@ while (!$migrator->finished()) phpbb_end_update($cache); } - echo $migrator->last_run_migration['name'] . '<br />'; + $state = array_merge(array( + 'migration_schema_done' => false, + 'migration_data_done' => false, + ), + $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']) . '<br />'; + } + else + { + if ($state['migration_data_done']) + { + echo $user->lang('MIGRATION_DATA_DONE', $migrator->last_run_migration['name']) . '<br />'; + } + else if ($state['migration_schema_done']) + { + echo $user->lang('MIGRATION_SCHEMA_DONE', $migrator->last_run_migration['name']) . '<br />'; + } + } // 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) |
