aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/database_update.php8
-rw-r--r--phpBB/install/install_install.php13
2 files changed, 16 insertions, 5 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 6c8a95a413..3382e57e76 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -210,7 +210,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);
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index f0280acc40..4cc154509c 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -114,7 +114,7 @@ class install_install extends module
$this->add_bots($mode, $sub);
$this->email_admin($mode, $sub);
$this->disable_avatars_if_unwritable();
- $this->populate_migrations($phpbb_container->get('migrator'), $phpbb_root_path);
+ $this->populate_migrations($phpbb_container->get('ext.manager'), $phpbb_container->get('migrator'));
// Remove the lock file
@unlink($phpbb_root_path . 'cache/install_lock');
@@ -1888,12 +1888,17 @@ class install_install extends module
* "installs" means it adds all migrations to the migrations table, but does not
* perform any of the actions in the migrations.
*
+ * @param phpbb_extension_manager $extension_manager
* @param phpbb_db_migrator $migrator
- * @param string $phpbb_root_path
*/
- function populate_migrations($migrator, $phpbb_root_path)
+ function populate_migrations($extension_manager, $migrator)
{
- $migrator->populate_migrations_from_directory($phpbb_root_path . 'includes/db/migration/data/');
+ $finder = $extension_manager->get_finder();
+
+ $migrations = $finder
+ ->core_path('includes/db/migration/data/')
+ ->get_classes();
+ $migrator->populate_migrations($migrations);
}
/**