mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-05 15:16:16 +02:00
[ticket/13891] Handle verbosity
PHPBB3-13891
This commit is contained in:
parent
dd131d7439
commit
5970d0360c
@ -86,5 +86,6 @@ $lang = array_merge($lang, array(
|
|||||||
'CLI_FIXUP_RECALCULATE_EMAIL_HASH_SUCCESS' => 'Successfully recalculated all email hashes.',
|
'CLI_FIXUP_RECALCULATE_EMAIL_HASH_SUCCESS' => 'Successfully recalculated all email hashes.',
|
||||||
|
|
||||||
'CLI_REPARSER_REPARSE_REPARSING' => 'Reparsing %1$s (range %2$d..%3$d)',
|
'CLI_REPARSER_REPARSE_REPARSING' => 'Reparsing %1$s (range %2$d..%3$d)',
|
||||||
|
'CLI_REPARSER_REPARSE_REPARSING_START' => 'Reparsing %s...',
|
||||||
'CLI_REPARSER_REPARSE_SUCCESS' => 'Reparsing ended with success',
|
'CLI_REPARSER_REPARSE_SUCCESS' => 'Reparsing ended with success',
|
||||||
));
|
));
|
||||||
|
@ -136,14 +136,28 @@ class reparse extends \phpbb\console\command\command
|
|||||||
}
|
}
|
||||||
|
|
||||||
$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', str_replace('text_reparser.', '', $name), $min, $max));
|
||||||
$this->io->newLine(2);
|
|
||||||
|
|
||||||
$progress = $this->io->createProgressBar($max);
|
$progress = $this->io->createProgressBar($max);
|
||||||
|
if ($output->getVerbosity() === OutputInterface::VERBOSITY_VERBOSE)
|
||||||
|
{
|
||||||
|
$progress->setFormat('<info>[%percent:3s%%]</info> %message%');
|
||||||
|
$progress->setOverwrite(false);
|
||||||
|
}
|
||||||
|
elseif ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERY_VERBOSE)
|
||||||
|
{
|
||||||
|
$progress->setFormat('<info>[%current:s%/%max:s%]</info><comment>[%elapsed%/%estimated%][%memory%]</comment> %message%');
|
||||||
|
$progress->setOverwrite(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->io->newLine(2);
|
||||||
$progress->setFormat(
|
$progress->setFormat(
|
||||||
" %current:s%/%max:s% %bar% %percent:3s%%\n" .
|
" %current:s%/%max:s% %bar% %percent:3s%%\n" .
|
||||||
" %message% %elapsed:6s%/%estimated:-6s% %memory:6s%\n");
|
" %message% %elapsed:6s%/%estimated:-6s% %memory:6s%\n");
|
||||||
$progress->setBarWidth(60);
|
$progress->setBarWidth(60);
|
||||||
$progress->setMessage('');
|
}
|
||||||
|
|
||||||
|
$progress->setMessage($this->user->lang('CLI_REPARSER_REPARSE_REPARSING_START', str_replace('text_reparser.', '', $name)));
|
||||||
|
|
||||||
if (!defined('PHP_WINDOWS_VERSION_BUILD'))
|
if (!defined('PHP_WINDOWS_VERSION_BUILD'))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user