aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/database_update.php
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2013-03-03 19:54:22 -0600
committerNathaniel Guse <nathaniel.guse@gmail.com>2013-03-03 19:54:22 -0600
commite4f782819968ec44f1dd207dc9de7ec703826d29 (patch)
treee55e3aa115c561d0522b15c897a86a2de8d208ef /phpBB/install/database_update.php
parentbee4f8d8185d4ff5278be758db4ea4a814f09b4f (diff)
downloadforums-e4f782819968ec44f1dd207dc9de7ec703826d29.tar
forums-e4f782819968ec44f1dd207dc9de7ec703826d29.tar.gz
forums-e4f782819968ec44f1dd207dc9de7ec703826d29.tar.bz2
forums-e4f782819968ec44f1dd207dc9de7ec703826d29.tar.xz
forums-e4f782819968ec44f1dd207dc9de7ec703826d29.zip
[ticket/11386] Send list of migrations instead of using load_migrations
Remove dependency of extension manager for migrator. Keeping load_migrations function for others to use if they desire but requiring the finder be sent to it in order to use it. PHPBB3-11386
Diffstat (limited to 'phpBB/install/database_update.php')
-rw-r--r--phpBB/install/database_update.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 4938ef0f87..b84f00659c 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);