diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-03-03 19:54:22 -0600 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-03-03 19:54:22 -0600 |
commit | e4f782819968ec44f1dd207dc9de7ec703826d29 (patch) | |
tree | e55e3aa115c561d0522b15c897a86a2de8d208ef /phpBB/install/install_install.php | |
parent | bee4f8d8185d4ff5278be758db4ea4a814f09b4f (diff) | |
download | forums-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/install_install.php')
-rw-r--r-- | phpBB/install/install_install.php | 13 |
1 files changed, 9 insertions, 4 deletions
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); } /** |