From 06f4ebce1b1cc8ecd5ddd84f7d2705007a685de3 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sun, 31 May 2015 17:19:42 +0200 Subject: [ticket/13740] CLI installer and fixes [ci skip] PHPBB3-13740 --- .../install/helper/iohandler/cli_iohandler.php | 235 +++++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 phpBB/phpbb/install/helper/iohandler/cli_iohandler.php (limited to 'phpBB/phpbb/install/helper/iohandler/cli_iohandler.php') diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php new file mode 100644 index 0000000000..d990f48925 --- /dev/null +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -0,0 +1,235 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\install\helper\iohandler; + +use phpbb\install\exception\installer_exception; +use Symfony\Component\Console\Helper\ProgressBar; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\OutputStyle; + +/** + * Input-Output handler for the CLI frontend + */ +class cli_iohandler extends iohandler_base +{ + /** + * @var OutputInterface + */ + protected $output; + + /** + * @var OutputStyle + */ + protected $io; + + /** + * @var array + */ + protected $input_values = array(); + + /** + * @var ProgressBar + */ + protected $progress_bar; + + /** + * Set the style and output used to display feedback; + * + * @param OutputStyle $style + */ + public function set_style(OutputStyle $style, OutputInterface $output) + { + $this->io = $style; + $this->output = $output; + } + + /** + * {@inheritdoc} + */ + public function get_input($name, $default, $multibyte = false) + { + $result = $default; + + if (isset($this->input_values[$name])) + { + $result = $this->input_values[$name]; + } + + + if ($multibyte) + { + return utf8_normalize_nfc($result); + } + + return $result; + } + + public function set_input($name, $value) + { + $this->input_values[$name] = $value; + } + + /** + * {@inheritdoc} + */ + public function get_server_variable($name, $default = '') + { + return $default; + } + + /** + * {@inheritdoc} + */ + public function get_header_variable($name, $default = '') + { + return $default; + } + + /** + * {@inheritdoc} + */ + public function is_secure() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function add_user_form_group($title, $form) + { + throw new installer_exception('MISSING_DATA'); + } + + /** + * {@inheritdoc} + */ + public function send_response() + { + } + + /** + * {@inheritdoc + */ + public function add_error_message($error_title, $error_description = false) + { + $this->io->newLine(); + + $message = $this->translate_message($error_title, $error_description); + $this->io->error($message['title'] . "\n" . $message['description']); + + if ($this->progress_bar !== null) + { + $this->io->newLine(2); + $this->progress_bar->display(); + } + } + + /** + * {@inheritdoc + */ + public function add_warning_message($warning_title, $warning_description = false) + { + $this->io->newLine(); + + $message = $this->translate_message($warning_title, $warning_description); + $this->io->warning($message['title'] . "\n" . $message['description']); + + if ($this->progress_bar !== null) + { + $this->io->newLine(2); + $this->progress_bar->display(); + } + } + + /** + * {@inheritdoc + */ + public function add_log_message($log_title, $log_description = false) + { + if ($this->output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL) + { + $this->output->writeln(sprintf('[%3d/%-3d] ---- %s', $this->current_task_progress, $this->task_progress_count, $this->translate_message($log_title, $log_description)['title'])); + } + } + + /** + * {@inheritdoc + */ + public function add_success_message($error_title, $error_description = false) + { + $this->io->newLine(); + + $message = $this->translate_message($error_title, $error_description); + $this->io->success($message['title'] . "\n" . $message['description']); + + if ($this->progress_bar !== null) + { + $this->io->newLine(2); + $this->progress_bar->display(); + } + } + + public function set_task_count($task_count) + { + parent::set_task_count($task_count); + + if ($this->output->getVerbosity() === OutputInterface::VERBOSITY_NORMAL) + { + $this->progress_bar = $this->io->createProgressBar($task_count); + $this->progress_bar->setFormat( + " %current:3s%/%max:-3s% %bar% %percent:3s%%\n" . + " %message%\n"); + $this->progress_bar->setBarWidth(60); + + if (!defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->progress_bar->setEmptyBarCharacter('░'); // light shade character \u2591 + $this->progress_bar->setProgressCharacter(''); + $this->progress_bar->setBarCharacter('▓'); // dark shade character \u2593 + } + $this->progress_bar->setMessage(''); + $this->io->newLine(2); + $this->progress_bar->start(); + } + } + + public function set_progress($task_lang_key, $task_number) + { + parent::set_progress($task_lang_key, $task_number); + + if ($this->progress_bar !== null) + { + $this->progress_bar->setProgress($this->current_task_progress); + $this->progress_bar->setMessage($this->current_task_name); + } + else + { + $this->output->writeln(sprintf('[%3d/%-3d] %s', $this->current_task_progress, $this->task_progress_count, $this->current_task_name)); + } + } + + /** + * {@inheritdoc} + */ + public function finish_progress($message_lang_key) + { + parent::finish_progress($message_lang_key); + + if ($this->progress_bar !== null) + { + $this->progress_bar->finish(); + $this->progress_bar = null; + } + } +} -- cgit v1.2.1 From 249345d9cc6d6bff380436d6e05f24918d762c0d Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Sat, 27 Jun 2015 17:10:42 +0200 Subject: [ticket/13740] Clean up CLI merge [ci skip] PHPBB3-13740 --- .../install/helper/iohandler/cli_iohandler.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'phpBB/phpbb/install/helper/iohandler/cli_iohandler.php') diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php index d990f48925..f711abe431 100644 --- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -232,4 +232,25 @@ class cli_iohandler extends iohandler_base $this->progress_bar = null; } } + + /** + * {@inheritdoc} + */ + public function request_refresh() + { + } + + /** + * {@inheritdoc} + */ + public function set_active_stage_menu($menu_path) + { + } + + /** + * {@inheritdoc} + */ + public function set_finished_stage_menu($menu_path) + { + } } -- cgit v1.2.1 From 8bfd29e86dac675919d3572aac3ba5891d9d844e Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Tue, 30 Jun 2015 18:54:46 +0200 Subject: [ticket/13740] Clean up CLI CS PHPBB3-13740 --- phpBB/phpbb/install/helper/iohandler/cli_iohandler.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'phpBB/phpbb/install/helper/iohandler/cli_iohandler.php') diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php index f711abe431..f9c19f6d85 100644 --- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -14,7 +14,6 @@ namespace phpbb\install\helper\iohandler; use phpbb\install\exception\installer_exception; -use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\OutputStyle; @@ -39,7 +38,7 @@ class cli_iohandler extends iohandler_base protected $input_values = array(); /** - * @var ProgressBar + * @var \Symfony\Component\Console\Helper\ProgressBar */ protected $progress_bar; @@ -66,7 +65,6 @@ class cli_iohandler extends iohandler_base $result = $this->input_values[$name]; } - if ($multibyte) { return utf8_normalize_nfc($result); @@ -160,7 +158,8 @@ class cli_iohandler extends iohandler_base { if ($this->output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL) { - $this->output->writeln(sprintf('[%3d/%-3d] ---- %s', $this->current_task_progress, $this->task_progress_count, $this->translate_message($log_title, $log_description)['title'])); + $message = $this->translate_message($log_title, $log_description); + $this->output->writeln(sprintf('[%3d/%-3d] ---- %s', $this->current_task_progress, $this->task_progress_count, $message['title'])); } } @@ -193,11 +192,13 @@ class cli_iohandler extends iohandler_base " %message%\n"); $this->progress_bar->setBarWidth(60); - if (!defined('PHP_WINDOWS_VERSION_BUILD')) { + if (!defined('PHP_WINDOWS_VERSION_BUILD')) + { $this->progress_bar->setEmptyBarCharacter('░'); // light shade character \u2591 $this->progress_bar->setProgressCharacter(''); $this->progress_bar->setBarCharacter('▓'); // dark shade character \u2593 } + $this->progress_bar->setMessage(''); $this->io->newLine(2); $this->progress_bar->start(); -- cgit v1.2.1 From 6216007caaa884bdbca8bbb5e098ff231b5a36a6 Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Mon, 20 Jul 2015 18:47:10 +0200 Subject: [ticket/13740] Fix docblocks and comments PHPBB3-13740 --- phpBB/phpbb/install/helper/iohandler/cli_iohandler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/phpbb/install/helper/iohandler/cli_iohandler.php') diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php index f9c19f6d85..bf68f363c3 100644 --- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -45,7 +45,8 @@ class cli_iohandler extends iohandler_base /** * Set the style and output used to display feedback; * - * @param OutputStyle $style + * @param OutputStyle $style + * @param OutputInterface $output */ public function set_style(OutputStyle $style, OutputInterface $output) { -- cgit v1.2.1 From fbd5929606169d3f780f0a59760c171b20bd906d Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Thu, 23 Jul 2015 20:50:33 +0200 Subject: [ticket/13740] Login admin when install finished PHPBB3-13740 --- phpBB/phpbb/install/helper/iohandler/cli_iohandler.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'phpBB/phpbb/install/helper/iohandler/cli_iohandler.php') diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php index bf68f363c3..c5b2bb06bc 100644 --- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -255,4 +255,11 @@ class cli_iohandler extends iohandler_base public function set_finished_stage_menu($menu_path) { } + + /** + * {@inheritdoc} + */ + public function set_cookie($cookie_name, $cookie_value) + { + } } -- cgit v1.2.1 From 8f5a0ad6f73e7b7757b02c827436384c96069b5a Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Fri, 24 Jul 2015 09:20:50 +0200 Subject: [ticket/14039] Revamp updater PHPBB3-14039 --- .../install/helper/iohandler/cli_iohandler.php | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'phpBB/phpbb/install/helper/iohandler/cli_iohandler.php') diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php index c5b2bb06bc..abdd730d2e 100644 --- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -181,9 +181,12 @@ class cli_iohandler extends iohandler_base } } - public function set_task_count($task_count) + /** + * {@inheritdoc} + */ + public function set_task_count($task_count, $restart = false) { - parent::set_task_count($task_count); + parent::set_task_count($task_count, $restart); if ($this->output->getVerbosity() === OutputInterface::VERBOSITY_NORMAL) { @@ -206,6 +209,9 @@ class cli_iohandler extends iohandler_base } } + /** + * {@inheritdoc} + */ public function set_progress($task_lang_key, $task_number) { parent::set_progress($task_lang_key, $task_number); @@ -262,4 +268,18 @@ class cli_iohandler extends iohandler_base public function set_cookie($cookie_name, $cookie_value) { } + + /** + * {@inheritdoc} + */ + public function add_download_link($route, $title, $msg = null) + { + } + + /** + * {@inheritdoc} + */ + public function render_update_file_status($status_array) + { + } } -- cgit v1.2.1 From 1b9ae803c5cf887c8acc2e7580ccb6fe76522d58 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 7 Dec 2015 13:53:44 +0100 Subject: [ticket/14345] Check if description exists in message ary PHPBB3-14345 --- phpBB/phpbb/install/helper/iohandler/cli_iohandler.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'phpBB/phpbb/install/helper/iohandler/cli_iohandler.php') diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php index abdd730d2e..dae5d339a5 100644 --- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -126,7 +126,8 @@ class cli_iohandler extends iohandler_base $this->io->newLine(); $message = $this->translate_message($error_title, $error_description); - $this->io->error($message['title'] . "\n" . $message['description']); + $message_string = $message['title'] . "\n" . (!empty($message['description']) ? $message['description'] : ''); + $this->io->error($message_string); if ($this->progress_bar !== null) { @@ -143,7 +144,8 @@ class cli_iohandler extends iohandler_base $this->io->newLine(); $message = $this->translate_message($warning_title, $warning_description); - $this->io->warning($message['title'] . "\n" . $message['description']); + $message_string = $message['title'] . "\n" . (!empty($message['description']) ? $message['description'] : ''); + $this->io->warning($message_string); if ($this->progress_bar !== null) { @@ -172,7 +174,8 @@ class cli_iohandler extends iohandler_base $this->io->newLine(); $message = $this->translate_message($error_title, $error_description); - $this->io->success($message['title'] . "\n" . $message['description']); + $message_string = $message['title'] . "\n" . (!empty($message['description']) ? $message['description'] : ''); + $this->io->success($message_string); if ($this->progress_bar !== null) { -- cgit v1.2.1 From 41b4fee6557c34d9ff534e7c1693d4e84e166ce1 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 7 Dec 2015 16:59:04 +0100 Subject: [ticket/14345] Move new line to ternary comparison PHPBB3-14345 --- phpBB/phpbb/install/helper/iohandler/cli_iohandler.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/phpbb/install/helper/iohandler/cli_iohandler.php') diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php index dae5d339a5..4d0341ef12 100644 --- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -126,7 +126,7 @@ class cli_iohandler extends iohandler_base $this->io->newLine(); $message = $this->translate_message($error_title, $error_description); - $message_string = $message['title'] . "\n" . (!empty($message['description']) ? $message['description'] : ''); + $message_string = $message['title'] . (!empty($message['description']) ? "\n" . $message['description'] : ''); $this->io->error($message_string); if ($this->progress_bar !== null) @@ -144,7 +144,7 @@ class cli_iohandler extends iohandler_base $this->io->newLine(); $message = $this->translate_message($warning_title, $warning_description); - $message_string = $message['title'] . "\n" . (!empty($message['description']) ? $message['description'] : ''); + $message_string = $message['title'] . (!empty($message['description']) ? "\n" . $message['description'] : ''); $this->io->warning($message_string); if ($this->progress_bar !== null) @@ -174,7 +174,7 @@ class cli_iohandler extends iohandler_base $this->io->newLine(); $message = $this->translate_message($error_title, $error_description); - $message_string = $message['title'] . "\n" . (!empty($message['description']) ? $message['description'] : ''); + $message_string = $message['title'] . (!empty($message['description']) ? "\n" . $message['description'] : ''); $this->io->success($message_string); if ($this->progress_bar !== null) -- cgit v1.2.1 From 6188a8777950ffeaa80593d815600c84911ac932 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 7 Dec 2015 23:36:49 +0100 Subject: [ticket/14344] Improve output of HTML errors trigged during install PHPBB3-14344 --- phpBB/phpbb/install/helper/iohandler/cli_iohandler.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'phpBB/phpbb/install/helper/iohandler/cli_iohandler.php') diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php index 4d0341ef12..89f3594378 100644 --- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -125,6 +125,10 @@ class cli_iohandler extends iohandler_base { $this->io->newLine(); + if (strpos($error_title, '
') !== false) + { + $error_title = strip_tags(str_replace('
', "\n", $error_title)); + } $message = $this->translate_message($error_title, $error_description); $message_string = $message['title'] . (!empty($message['description']) ? "\n" . $message['description'] : ''); $this->io->error($message_string); -- cgit v1.2.1 From a649768e17d25bcf55ae539420abe4eb4b7a1ef1 Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Wed, 28 Oct 2015 15:00:11 +0100 Subject: [ticket/14262] Move convertor to controller PHPBB3-14262 --- phpBB/phpbb/install/helper/iohandler/cli_iohandler.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'phpBB/phpbb/install/helper/iohandler/cli_iohandler.php') diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php index 89f3594378..7945904524 100644 --- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -289,4 +289,11 @@ class cli_iohandler extends iohandler_base public function render_update_file_status($status_array) { } + + /** + * {@inheritdoc} + */ + public function redirect($url, $use_ajax = false) + { + } } -- cgit v1.2.1 From 955b9ede33c5696173a760ea271ec32d79e843b9 Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Thu, 11 Feb 2016 13:18:30 +0100 Subject: [ticket/14462] Further speed improvements - Cache the secondary container - Only initialize tasks/modules that are being used - Add timeout error message in the AJAX UI PHPBB3-14462 --- phpBB/phpbb/install/helper/iohandler/cli_iohandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/install/helper/iohandler/cli_iohandler.php') diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php index 7945904524..94550d2db0 100644 --- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -114,7 +114,7 @@ class cli_iohandler extends iohandler_base /** * {@inheritdoc} */ - public function send_response() + public function send_response($no_more_output = false) { } -- cgit v1.2.1 From 1629e6aaf36092241eaf6c745af5c3b38f8182b3 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Thu, 5 May 2016 17:05:17 +0200 Subject: [ticket/14628] Supports translatable error messages in the CLI installer PHPBB3-14628 --- phpBB/phpbb/install/helper/iohandler/cli_iohandler.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'phpBB/phpbb/install/helper/iohandler/cli_iohandler.php') diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php index 94550d2db0..2a41cb10ba 100644 --- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -124,13 +124,14 @@ class cli_iohandler extends iohandler_base public function add_error_message($error_title, $error_description = false) { $this->io->newLine(); + $message = $this->translate_message($error_title, $error_description); + $message_string = $message['title'] . (!empty($message['description']) ? "\n" . $message['description'] : ''); - if (strpos($error_title, '
') !== false) + if (strpos($message_string, '
') !== false) { - $error_title = strip_tags(str_replace('
', "\n", $error_title)); + $message_string = strip_tags(str_replace('
', "\n", $message_string)); } - $message = $this->translate_message($error_title, $error_description); - $message_string = $message['title'] . (!empty($message['description']) ? "\n" . $message['description'] : ''); + $this->io->error($message_string); if ($this->progress_bar !== null) -- cgit v1.2.1 From a37f10ae0951f16b115f4a175cc546a515cf7937 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Sat, 20 Aug 2016 22:40:37 +0200 Subject: [ticket/14742] Increase user feedback by improving progress bar We now count and display each step that was done by increasing the task count. PHPBB3-14742 --- phpBB/phpbb/install/helper/iohandler/cli_iohandler.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'phpBB/phpbb/install/helper/iohandler/cli_iohandler.php') diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php index 2a41cb10ba..196cdcdaab 100644 --- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -198,6 +198,16 @@ class cli_iohandler extends iohandler_base if ($this->output->getVerbosity() === OutputInterface::VERBOSITY_NORMAL) { + if ($this->progress_bar !== null) + { + // Symfony's ProgressBar is immutable regarding task_count, so delete the old and create a new one. + $this->progress_bar->clear(); + } + else + { + $this->io->newLine(2); + } + $this->progress_bar = $this->io->createProgressBar($task_count); $this->progress_bar->setFormat( " %current:3s%/%max:-3s% %bar% %percent:3s%%\n" . @@ -212,7 +222,6 @@ class cli_iohandler extends iohandler_base } $this->progress_bar->setMessage(''); - $this->io->newLine(2); $this->progress_bar->start(); } } -- cgit v1.2.1 From 9aa017d0f7ce13a11114cbae24b694e935931342 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 25 Nov 2016 22:15:13 +0100 Subject: [ticket/14875] Add method for raw input to request and add to installer A method for retrieving raw input has been added to the request class. This will be used in the installer to retrieve the datatabase password while also allowing utf8 characters. Not escaping the input is ok in this case as it won't be put anywhere in this raw form and only be used to populate the entry for the password field in config.php. PHPBB3-14875 --- phpBB/phpbb/install/helper/iohandler/cli_iohandler.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'phpBB/phpbb/install/helper/iohandler/cli_iohandler.php') diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php index 196cdcdaab..4117a3dfd3 100644 --- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -74,6 +74,20 @@ class cli_iohandler extends iohandler_base return $result; } + /** + * {@inheritdoc} + */ + public function get_raw_input($name, $default) + { + return $this->get_input($name, $default, true); + } + + /** + * Set input variable + * + * @param string $name Name of input variable + * @param mixed $value Value of input variable + */ public function set_input($name, $value) { $this->input_values[$name] = $value; -- cgit v1.2.1