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

Merge branch 'ticket/17402' into ticket/17402-master

This commit is contained in:
rxu
2024-10-17 00:34:05 +07:00
4 changed files with 25 additions and 14 deletions

View File

@@ -93,6 +93,12 @@ class reparse extends \phpbb\console\command\command
InputOption::VALUE_NONE,
$this->user->lang('CLI_DESCRIPTION_REPARSER_REPARSE_OPT_DRY_RUN')
)
->addOption(
'force-bbcode-reparsing',
null,
InputOption::VALUE_NONE,
$this->user->lang('CLI_DESCRIPTION_REPARSER_REPARSE_OPT_FORCE_BBCODE')
)
->addOption(
'resume',
null,
@@ -223,13 +229,15 @@ class reparse extends \phpbb\console\command\command
// Start from $max and decrement $current by $size until we reach $min
$current = $max;
$force_bbcode_reparsing = (bool) $this->get_option('force-bbcode-reparsing');
while ($current >= $min)
{
$start = max($min, $current + 1 - $size);
$end = max($min, $current);
$progress->setMessage($this->user->lang('CLI_REPARSER_REPARSE_REPARSING', $reparser->get_name(), $start, $end));
$reparser->reparse_range($start, $end);
$reparser->reparse_range($start, $end, $force_bbcode_reparsing);
$current = $start - 1;
$progress->setProgress($max + 1 - $start);