1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/14434] Remove recursion to simplify is_migration method

PHPBB3-14434
This commit is contained in:
Matt Friedman
2016-01-27 11:46:04 -08:00
parent 47d8aeebde
commit 3bd8a2ba19
3 changed files with 17 additions and 26 deletions

View File

@@ -137,9 +137,16 @@ class base implements \phpbb\extension\extension_interface
$migrations = $this->extension_finder->get_classes_from_files($migrations);
// Unset classes that do not exist or do not extend the
// abstract class phpbb\db\migration\migration
\phpbb\db\migrator::is_migration($migrations);
// Unset classes that are not a valid migration
foreach ($migrations as $key => $migration)
{
if (\phpbb\db\migrator::is_migration($migration) === true)
{
continue;
}
unset($migrations[$key]);
}
return $migrations;
}