diff options
author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-05-31 17:19:42 +0200 |
---|---|---|
committer | Mate Bartus <mate.bartus@gmail.com> | 2015-07-08 01:28:08 +0200 |
commit | 06f4ebce1b1cc8ecd5ddd84f7d2705007a685de3 (patch) | |
tree | 23923bb100b08fe4a0e30c5a98cccad8f6148f42 /phpBB/phpbb/install/helper/iohandler/iohandler_base.php | |
parent | 524b98e7bd19bff7b12c7ba4c771d6d60d4300a6 (diff) | |
download | forums-06f4ebce1b1cc8ecd5ddd84f7d2705007a685de3.tar forums-06f4ebce1b1cc8ecd5ddd84f7d2705007a685de3.tar.gz forums-06f4ebce1b1cc8ecd5ddd84f7d2705007a685de3.tar.bz2 forums-06f4ebce1b1cc8ecd5ddd84f7d2705007a685de3.tar.xz forums-06f4ebce1b1cc8ecd5ddd84f7d2705007a685de3.zip |
[ticket/13740] CLI installer and fixes
[ci skip]
PHPBB3-13740
Diffstat (limited to 'phpBB/phpbb/install/helper/iohandler/iohandler_base.php')
-rw-r--r-- | phpBB/phpbb/install/helper/iohandler/iohandler_base.php | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/phpBB/phpbb/install/helper/iohandler/iohandler_base.php b/phpBB/phpbb/install/helper/iohandler/iohandler_base.php index f767ecf4e9..006411f1e3 100644 --- a/phpBB/phpbb/install/helper/iohandler/iohandler_base.php +++ b/phpBB/phpbb/install/helper/iohandler/iohandler_base.php @@ -44,6 +44,13 @@ abstract class iohandler_base implements iohandler_interface protected $logs; /** + * Array of success messages + * + * @var array + */ + protected $success; + + /** * @var \phpbb\language\language */ protected $language; @@ -71,6 +78,7 @@ abstract class iohandler_base implements iohandler_interface $this->errors = array(); $this->warnings = array(); $this->logs = array(); + $this->success = array(); $this->task_progress_count = 0; $this->current_task_progress = 0; @@ -114,6 +122,14 @@ abstract class iohandler_base implements iohandler_interface /** * {@inheritdoc} */ + public function add_success_message($success_title, $success_description = false) + { + $this->success[] = $this->translate_message($success_title, $success_description); + } + + /** + * {@inheritdoc} + */ public function set_task_count($task_count) { $this->task_progress_count = $task_count; @@ -124,11 +140,27 @@ abstract class iohandler_base implements iohandler_interface */ public function set_progress($task_lang_key, $task_number) { + $this->current_task_name = ''; + if (!empty($task_lang_key)) { $this->current_task_name = $this->language->lang($task_lang_key); - $this->current_task_progress = $task_number; } + + $this->current_task_progress = $task_number; + } + + /** + * {@inheritdoc} + */ + public function finish_progress($message_lang_key) + { + if (!empty($message_lang_key)) + { + $this->current_task_name = $this->language->lang($message_lang_key); + } + + $this->current_task_progress = $this->task_progress_count; } /** |