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

[ticket/14831] Add migration for deduplicating entries and fix typo

PHPBB3-14831
This commit is contained in:
Marc Alexander
2016-10-23 22:00:02 +02:00
parent 9f2867b115
commit c891277996
2 changed files with 81 additions and 3 deletions

View File

@@ -212,12 +212,12 @@ class migrator
// Try falling back to a valid migration name with or without leading backslash
if (!isset($this->migration_state[$name]))
{
$appended_name = preg_replace('#^(?!\\\)#', '\\\$0', $name);
$prepended_name = preg_replace('#^(?!\\\)#', '\\\$0', $name);
$prefixless_name = preg_replace('#(^\\\)([^\\\].+)#', '$2', $name);
if (isset($this->migration_state[$appended_name]))
if (isset($this->migration_state[$prepended_name]))
{
$name = $appended_name;
$name = $prepended_name;
}
else if (isset($this->migration_state[$prefixless_name]))
{