diff options
author | Oliver Schramm <oliver.schramm97@gmail.com> | 2016-08-11 23:28:54 +0200 |
---|---|---|
committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2016-08-11 23:28:54 +0200 |
commit | 03be89ebd7bfd95e8586d0d13076a90afec243ee (patch) | |
tree | 22843d02cf0c140c2d9eb1dab1e3d9fea80fa734 /phpBB/phpbb/db/migrator.php | |
parent | 210310b584a0bd816132efa3d8f1ce082efebf88 (diff) | |
download | forums-03be89ebd7bfd95e8586d0d13076a90afec243ee.tar forums-03be89ebd7bfd95e8586d0d13076a90afec243ee.tar.gz forums-03be89ebd7bfd95e8586d0d13076a90afec243ee.tar.bz2 forums-03be89ebd7bfd95e8586d0d13076a90afec243ee.tar.xz forums-03be89ebd7bfd95e8586d0d13076a90afec243ee.zip |
[ticket/14742] Fix progress bar in database updater
Because of the new way, schema update steps are handled, the already
misleading progress bar was even more misleading. This should fix it.
PHPBB3-14742
Diffstat (limited to 'phpBB/phpbb/db/migrator.php')
-rw-r--r-- | phpBB/phpbb/db/migrator.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php index 89f05f7b40..9e76668655 100644 --- a/phpBB/phpbb/db/migrator.php +++ b/phpBB/phpbb/db/migrator.php @@ -205,6 +205,28 @@ class migrator } /** + * Get the list of available and not installed migration class names + * + * @return array + */ + public function get_installable_migrations() + { + $unfinished_migrations = array(); + + foreach ($this->migrations as $name) + { + if (!isset($this->migration_state[$name]) || + !$this->migration_state[$name]['migration_schema_done'] || + !$this->migration_state[$name]['migration_data_done']) + { + $unfinished_migrations[] = $name; + } + } + + return $unfinished_migrations; + } + + /** * Runs a single update step from the next migration to be applied. * * The update step can either be a schema or a (partial) data update. To |