aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/migrator.php
diff options
context:
space:
mode:
authorkasimi <mail@kasimi.net>2017-10-13 14:46:32 +0200
committerkasimi <mail@kasimi.net>2017-10-13 14:46:32 +0200
commited9b896d228ba5a03841d6de6851f330eb742fd4 (patch)
treed2edb8938c151f09c718d914a216b310fd315696 /phpBB/phpbb/db/migrator.php
parent2c01fe67e9313565741f20d207ffb289b1d0b2d3 (diff)
downloadforums-ed9b896d228ba5a03841d6de6851f330eb742fd4.tar
forums-ed9b896d228ba5a03841d6de6851f330eb742fd4.tar.gz
forums-ed9b896d228ba5a03841d6de6851f330eb742fd4.tar.bz2
forums-ed9b896d228ba5a03841d6de6851f330eb742fd4.tar.xz
forums-ed9b896d228ba5a03841d6de6851f330eb742fd4.zip
[ticket/15396] Fix revert_schema() steps not executed in correct order
PHPBB3-15396
Diffstat (limited to 'phpBB/phpbb/db/migrator.php')
-rw-r--r--phpBB/phpbb/db/migrator.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index d7d7f18d2b..6c026c3ae1 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -503,11 +503,14 @@ class migrator
return;
}
- foreach ($this->migration_state as $name => $state)
+ foreach ($this->migrations as $name)
{
- if (!empty($state['migration_depends_on']) && in_array($migration, $state['migration_depends_on']))
+ $state = $this->migration_state($name);
+
+ if ($state && in_array($migration, $state['migration_depends_on']) && ($state['migration_schema_done'] || $state['migration_data_done']))
{
$this->revert_do($name);
+ return;
}
}