diff options
| author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-07-02 13:40:02 +0200 |
|---|---|---|
| committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-07-02 13:40:02 +0200 |
| commit | 5970d0360c5b60a5af7bbaef37ffb8bb9932f8a8 (patch) | |
| tree | 900ac8d7e6da473414f4ad325b608a73517c1bf7 /phpBB/phpbb | |
| parent | dd131d74390a8c8766c28734efebede681e3b794 (diff) | |
| download | forums-5970d0360c5b60a5af7bbaef37ffb8bb9932f8a8.tar forums-5970d0360c5b60a5af7bbaef37ffb8bb9932f8a8.tar.gz forums-5970d0360c5b60a5af7bbaef37ffb8bb9932f8a8.tar.bz2 forums-5970d0360c5b60a5af7bbaef37ffb8bb9932f8a8.tar.xz forums-5970d0360c5b60a5af7bbaef37ffb8bb9932f8a8.zip | |
[ticket/13891] Handle verbosity
PHPBB3-13891
Diffstat (limited to 'phpBB/phpbb')
| -rw-r--r-- | phpBB/phpbb/console/command/reparser/reparse.php | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/phpBB/phpbb/console/command/reparser/reparse.php b/phpBB/phpbb/console/command/reparser/reparse.php index 3aac0e3e93..c261507a57 100644 --- a/phpBB/phpbb/console/command/reparser/reparse.php +++ b/phpBB/phpbb/console/command/reparser/reparse.php @@ -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->newLine(2); $progress = $this->io->createProgressBar($max); - $progress->setFormat( - " %current:s%/%max:s% %bar% %percent:3s%%\n" . - " %message% %elapsed:6s%/%estimated:-6s% %memory:6s%\n"); - $progress->setBarWidth(60); - $progress->setMessage(''); + 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( + " %current:s%/%max:s% %bar% %percent:3s%%\n" . + " %message% %elapsed:6s%/%estimated:-6s% %memory:6s%\n"); + $progress->setBarWidth(60); + } + + $progress->setMessage($this->user->lang('CLI_REPARSER_REPARSE_REPARSING_START', str_replace('text_reparser.', '', $name))); if (!defined('PHP_WINDOWS_VERSION_BUILD')) { |
