1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[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
This commit is contained in:
Oliver Schramm
2016-08-11 23:28:54 +02:00
parent 210310b584
commit 03be89ebd7
2 changed files with 38 additions and 3 deletions

View File

@@ -204,6 +204,28 @@ class migrator
return $this->migrations;
}
/**
* 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.
*