[ticket/14034] Fix reparser names that contain "text_reparser" in the middle

PHPBB3-14034
This commit is contained in:
JoshyPHP 2015-07-17 08:26:14 +02:00
parent e6e54430b9
commit e7763cd273
2 changed files with 4 additions and 4 deletions

View file

@ -36,7 +36,7 @@ class list_all extends \phpbb\console\command\command
foreach ($reparsers as $name => $reparser) foreach ($reparsers as $name => $reparser)
{ {
// Store the names without the "text_reparser." prefix // Store the names without the "text_reparser." prefix
$this->reparser_names[] = str_replace('text_reparser.', '', $name); $this->reparser_names[] = preg_replace('(^text_reparser\\.)', '', $name);
} }
} }

View file

@ -149,7 +149,7 @@ class reparse extends \phpbb\console\command\command
return; return;
} }
$this->io->section($this->user->lang('CLI_REPARSER_REPARSE_REPARSING', str_replace('text_reparser.', '', $name), $min, $max)); $this->io->section($this->user->lang('CLI_REPARSER_REPARSE_REPARSING', preg_replace('(^text_reparser\\.)', '', $name), $min, $max));
$progress = $this->io->createProgressBar($max); $progress = $this->io->createProgressBar($max);
if ($output->getVerbosity() === OutputInterface::VERBOSITY_VERBOSE) if ($output->getVerbosity() === OutputInterface::VERBOSITY_VERBOSE)
@ -171,7 +171,7 @@ class reparse extends \phpbb\console\command\command
$progress->setBarWidth(60); $progress->setBarWidth(60);
} }
$progress->setMessage($this->user->lang('CLI_REPARSER_REPARSE_REPARSING_START', str_replace('text_reparser.', '', $name))); $progress->setMessage($this->user->lang('CLI_REPARSER_REPARSE_REPARSING_START', preg_replace('(^text_reparser\\.)', '', $name)));
if (!defined('PHP_WINDOWS_VERSION_BUILD')) if (!defined('PHP_WINDOWS_VERSION_BUILD'))
{ {
@ -189,7 +189,7 @@ class reparse extends \phpbb\console\command\command
$start = max($min, $current + 1 - $size); $start = max($min, $current + 1 - $size);
$end = max($min, $current); $end = max($min, $current);
$progress->setMessage($this->user->lang('CLI_REPARSER_REPARSE_REPARSING', str_replace('text_reparser.', '', $name), $start, $end)); $progress->setMessage($this->user->lang('CLI_REPARSER_REPARSE_REPARSING', preg_replace('(^text_reparser\\.)', '', $name), $start, $end));
$reparser->reparse_range($start, $end); $reparser->reparse_range($start, $end);
$current = $start - 1; $current = $start - 1;