diff --git a/phpBB/phpbb/db/migration/data/v32x/add_missing_config.php b/phpBB/phpbb/db/migration/data/v32x/add_missing_config.php new file mode 100644 index 0000000000..53db984953 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v32x/add_missing_config.php @@ -0,0 +1,64 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v32x; + +use phpbb\db\migration\migration_interface; +use phpbb\db\migrator; + +class add_missing_config extends \phpbb\db\migration\container_aware_migration +{ + static public function depends_on() + { + return [ + '\phpbb\db\migration\data\v32x\v329', + ]; + } + + public function update_data() + { + $migration_classes = [ + '\phpbb\db\migration\data\v30x\release_3_0_3_rc1', + '\phpbb\db\migration\data\v30x\release_3_0_6_rc1', + '\phpbb\db\migration\data\v31x\add_jabber_ssl_context_config_options', + '\phpbb\db\migration\data\v31x\add_smtp_ssl_context_config_options', + '\phpbb\db\migration\data\v31x\update_hashes', + '\phpbb\db\migration\data\v320\font_awesome_update', + '\phpbb\db\migration\data\v320\text_reparser', + '\phpbb\db\migration\data\v32x\cookie_notice_p2', + ]; + + /** @var migrator $migrator */ + $migrator = $this->container->get('migrator'); + + $update_data = []; + + foreach ($migration_classes as $migration_class) + { + /** @var migration_interface $migration */ + $migration = $migrator->get_migration($migration_class); + + $migration_update_data = $migration->update_data(); + + foreach ($migration_update_data as $entry) + { + if ($entry[0] == 'config.add') + { + $update_data[] = $entry; + } + } + } + + return $update_data; + } +} diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php index 2b0c66fc58..f6f6a58639 100644 --- a/phpBB/phpbb/db/migrator.php +++ b/phpBB/phpbb/db/migrator.php @@ -948,7 +948,7 @@ class migrator * @param string $name Name of the migration * @return \phpbb\db\migration\migration */ - protected function get_migration($name) + public function get_migration($name) { $migration = new $name($this->config, $this->db, $this->db_tools, $this->phpbb_root_path, $this->php_ext, $this->table_prefix);