mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/14925] Set reparser names in service definitions
PHPBB3-14925
This commit is contained in:
@@ -140,13 +140,9 @@ class reparse extends \phpbb\console\command\command
|
||||
}
|
||||
|
||||
$name = $input->getArgument('reparser-name');
|
||||
if (isset($name))
|
||||
if ($name)
|
||||
{
|
||||
// Allow "post_text" to be an alias for "text_reparser.post_text"
|
||||
if (!isset($this->reparsers[$name]))
|
||||
{
|
||||
$name = 'text_reparser.' . $name;
|
||||
}
|
||||
$name = $this->reparser_manager->find_reparser($name);
|
||||
$this->reparse($name);
|
||||
}
|
||||
else
|
||||
@@ -187,7 +183,7 @@ class reparse extends \phpbb\console\command\command
|
||||
/**
|
||||
* Reparse all text handled by given reparser within given range
|
||||
*
|
||||
* @param string $name Reparser name
|
||||
* @param string $name Reparser service name
|
||||
*/
|
||||
protected function reparse($name)
|
||||
{
|
||||
@@ -218,10 +214,10 @@ class reparse extends \phpbb\console\command\command
|
||||
return;
|
||||
}
|
||||
|
||||
$this->io->section($this->user->lang('CLI_REPARSER_REPARSE_REPARSING', preg_replace('(^text_reparser\\.)', '', $name), $min, $max));
|
||||
$this->io->section($this->user->lang('CLI_REPARSER_REPARSE_REPARSING', $reparser->get_name(), $min, $max));
|
||||
|
||||
$progress = $this->create_progress_bar($max, $this->io, $this->output, true);
|
||||
$progress->setMessage($this->user->lang('CLI_REPARSER_REPARSE_REPARSING_START', preg_replace('(^text_reparser\\.)', '', $name)));
|
||||
$progress->setMessage($this->user->lang('CLI_REPARSER_REPARSE_REPARSING_START', $reparser->get_name()));
|
||||
$progress->start();
|
||||
|
||||
// Start from $max and decrement $current by $size until we reach $min
|
||||
@@ -231,7 +227,7 @@ class reparse extends \phpbb\console\command\command
|
||||
$start = max($min, $current + 1 - $size);
|
||||
$end = max($min, $current);
|
||||
|
||||
$progress->setMessage($this->user->lang('CLI_REPARSER_REPARSE_REPARSING', preg_replace('(^text_reparser\\.)', '', $name), $start, $end));
|
||||
$progress->setMessage($this->user->lang('CLI_REPARSER_REPARSE_REPARSING', $reparser->get_name(), $start, $end));
|
||||
$reparser->reparse_range($start, $end);
|
||||
|
||||
$current = $start - 1;
|
||||
|
Reference in New Issue
Block a user