diff options
author | JoshyPHP <s9e.dev@gmail.com> | 2015-07-17 08:26:14 +0200 |
---|---|---|
committer | JoshyPHP <s9e.dev@gmail.com> | 2015-07-17 08:26:14 +0200 |
commit | e7763cd273a88e4b99c67e2a74b83ed3ef86727f (patch) | |
tree | 188979883e858042f46e17add0b73c73f05ffb20 | |
parent | e6e54430b9560aaa6fafd73a5fc688795945d737 (diff) | |
download | forums-e7763cd273a88e4b99c67e2a74b83ed3ef86727f.tar forums-e7763cd273a88e4b99c67e2a74b83ed3ef86727f.tar.gz forums-e7763cd273a88e4b99c67e2a74b83ed3ef86727f.tar.bz2 forums-e7763cd273a88e4b99c67e2a74b83ed3ef86727f.tar.xz forums-e7763cd273a88e4b99c67e2a74b83ed3ef86727f.zip |
[ticket/14034] Fix reparser names that contain "text_reparser" in the middle
PHPBB3-14034
-rw-r--r-- | phpBB/phpbb/console/command/reparser/list_all.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/console/command/reparser/reparse.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/phpbb/console/command/reparser/list_all.php b/phpBB/phpbb/console/command/reparser/list_all.php index 1589836ddd..e42c3ac782 100644 --- a/phpBB/phpbb/console/command/reparser/list_all.php +++ b/phpBB/phpbb/console/command/reparser/list_all.php @@ -36,7 +36,7 @@ class list_all extends \phpbb\console\command\command foreach ($reparsers as $name => $reparser) { // Store the names without the "text_reparser." prefix - $this->reparser_names[] = str_replace('text_reparser.', '', $name); + $this->reparser_names[] = preg_replace('(^text_reparser\\.)', '', $name); } } diff --git a/phpBB/phpbb/console/command/reparser/reparse.php b/phpBB/phpbb/console/command/reparser/reparse.php index 151e196358..81d1aa0421 100644 --- a/phpBB/phpbb/console/command/reparser/reparse.php +++ b/phpBB/phpbb/console/command/reparser/reparse.php @@ -149,7 +149,7 @@ class reparse extends \phpbb\console\command\command 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); if ($output->getVerbosity() === OutputInterface::VERBOSITY_VERBOSE) @@ -171,7 +171,7 @@ class reparse extends \phpbb\console\command\command $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')) { @@ -189,7 +189,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', 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); $current = $start - 1; |