diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-03-02 11:42:30 -0600 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-03-02 11:42:30 -0600 |
commit | 1368470f7488b278cdc214745a7d4c9557d407e2 (patch) | |
tree | 1f8f63e6cd7b2a4d06f80904fc03f29b1904c341 /phpBB/includes/db/migrator.php | |
parent | 8415ae839cf699e043fe24ad91585dc419596ff8 (diff) | |
download | forums-1368470f7488b278cdc214745a7d4c9557d407e2.tar forums-1368470f7488b278cdc214745a7d4c9557d407e2.tar.gz forums-1368470f7488b278cdc214745a7d4c9557d407e2.tar.bz2 forums-1368470f7488b278cdc214745a7d4c9557d407e2.tar.xz forums-1368470f7488b278cdc214745a7d4c9557d407e2.zip |
[ticket/11386] Forgot to get the migration classes
PHPBB3-11386
Diffstat (limited to 'phpBB/includes/db/migrator.php')
-rw-r--r-- | phpBB/includes/db/migrator.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/phpBB/includes/db/migrator.php b/phpBB/includes/db/migrator.php index 824bca5e70..855e640554 100644 --- a/phpBB/includes/db/migrator.php +++ b/phpBB/includes/db/migrator.php @@ -193,17 +193,23 @@ class phpbb_db_migrator throw new phpbb_db_migration_exception('DIRECTORY INVALID', $path); } + $migrations = array(); + $finder = $this->extension_manager->get_finder(); - $migration_files = $finder + $files = $finder ->extension_directory("/") ->find_from_paths(array('/' => $path)); - foreach ($migration_files as $migration) + foreach ($files as $file) { - $migration_name = $migration['path'] . $migration['filename']; + $migrations[$file['path'] . $file['filename']] = ''; + } + $migrations = $finder->get_classes_from_files($migrations); - if (!in_array($migration_name, $this->migrations)) + foreach ($migrations as $migration) + { + if (!in_array($migration, $this->migrations)) { - $this->migrations[] = $migration_name; + $this->migrations[] = $migration; } } |