1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-20 23:51:28 +01:00

[ticket/15379] Only initialize reparsers on first call in migration

PHPBB3-15379
This commit is contained in:
Oliver Schramm 2017-09-25 17:48:37 +02:00
parent 4069cdd518
commit e41819e37a

View File

@ -54,13 +54,16 @@ class text_reparser extends \phpbb\db\migration\container_aware_migration
/** @var manager $reparser_manager */
$reparser_manager = $this->container->get('text_reparser.manager');
/** @var reparser_interface[] $reparsers */
$reparsers = $this->container->get('text_reparser_collection');
// Initialize all reparsers
foreach ($reparsers as $name => $reparser)
if (!is_array($resume_data))
{
$reparser_manager->update_resume_data($name, 1, $reparser->get_max_id(), 100);
/** @var reparser_interface[] $reparsers */
$reparsers = $this->container->get('text_reparser_collection');
// Initialize all reparsers
foreach ($reparsers as $name => $reparser)
{
$reparser_manager->update_resume_data($name, 1, $reparser->get_max_id(), 100);
}
}
// Sometimes a cron job is too much