aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/console/command/thumbnail/generate.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-04-23 23:04:05 +0200
committerMarc Alexander <admin@m-a-styles.de>2016-04-23 23:04:05 +0200
commitead261e6dba4d470160c6a31f95430b4053c0d54 (patch)
treec0eedf387f538cbe991da6ba36b5c61055122146 /phpBB/phpbb/console/command/thumbnail/generate.php
parent29bb1ab72d68ff9a19cb3e1d99d4a4a9060e55a1 (diff)
parentd713ce94ff218c2464823cb23dae1007354c60f3 (diff)
downloadforums-ead261e6dba4d470160c6a31f95430b4053c0d54.tar
forums-ead261e6dba4d470160c6a31f95430b4053c0d54.tar.gz
forums-ead261e6dba4d470160c6a31f95430b4053c0d54.tar.bz2
forums-ead261e6dba4d470160c6a31f95430b4053c0d54.tar.xz
forums-ead261e6dba4d470160c6a31f95430b4053c0d54.zip
Merge pull request #4286 from VSEphpbb/ticket/14569
[ticket/14569] Extract CLI progress bar creation to a method
Diffstat (limited to 'phpBB/phpbb/console/command/thumbnail/generate.php')
-rw-r--r--phpBB/phpbb/console/command/thumbnail/generate.php27
1 files changed, 1 insertions, 26 deletions
diff --git a/phpBB/phpbb/console/command/thumbnail/generate.php b/phpBB/phpbb/console/command/thumbnail/generate.php
index e677db3a97..64f7555336 100644
--- a/phpBB/phpbb/console/command/thumbnail/generate.php
+++ b/phpBB/phpbb/console/command/thumbnail/generate.php
@@ -115,32 +115,7 @@ class generate extends \phpbb\console\command\command
require($this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext);
}
- $progress = $io->createProgressBar($nb_missing_thumbnails);
- if ($output->getVerbosity() === OutputInterface::VERBOSITY_VERBOSE)
- {
- $progress->setFormat('<info>[%percent:3s%%]</info> %message%');
- $progress->setOverwrite(false);
- }
- else if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERY_VERBOSE)
- {
- $progress->setFormat('<info>[%current:s%/%max:s%]</info><comment>[%elapsed%/%estimated%][%memory%]</comment> %message%');
- $progress->setOverwrite(false);
- }
- else
- {
- $io->newLine(2);
- $progress->setFormat(
- " %current:s%/%max:s% %bar% %percent:3s%%\n" .
- " %elapsed:6s%/%estimated:-6s% %memory:6s%\n");
- $progress->setBarWidth(60);
- }
-
- if (!defined('PHP_WINDOWS_VERSION_BUILD'))
- {
- $progress->setEmptyBarCharacter('░'); // light shade character \u2591
- $progress->setProgressCharacter('');
- $progress->setBarCharacter('▓'); // dark shade character \u2593
- }
+ $progress = $this->create_progress_bar($nb_missing_thumbnails, $io, $output);
$progress->setMessage($this->user->lang('CLI_THUMBNAIL_GENERATING'));