diff options
Diffstat (limited to 'phpBB/phpbb')
5 files changed, 24 insertions, 5 deletions
diff --git a/phpBB/phpbb/captcha/plugins/qa.php b/phpBB/phpbb/captcha/plugins/qa.php index 7f804850a4..9d481acc5d 100644 --- a/phpBB/phpbb/captcha/plugins/qa.php +++ b/phpBB/phpbb/captcha/plugins/qa.php @@ -222,7 +222,11 @@ class qa { global $phpbb_log, $template, $user; - if ($this->is_solved() || empty($this->question_text) || !count($this->question_ids)) + if ($this->is_solved()) + { + return false; + } + else if (empty($this->question_text) || !count($this->question_ids)) { /** @var \phpbb\log\log_interface $phpbb_log */ $phpbb_log->add('critical', $user->data['user_id'], $user->ip, 'LOG_ERROR_CAPTCHA', time(), array($user->lang('CONFIRM_QUESTION_MISSING'))); @@ -231,10 +235,10 @@ class qa else { $template->assign_vars(array( - 'QA_CONFIRM_QUESTION' => $this->question_text, - 'QA_CONFIRM_ID' => $this->confirm_id, - 'S_CONFIRM_CODE' => true, - 'S_TYPE' => $this->type, + 'QA_CONFIRM_QUESTION' => $this->question_text, + 'QA_CONFIRM_ID' => $this->confirm_id, + 'S_CONFIRM_CODE' => true, + 'S_TYPE' => $this->type, )); return 'captcha_qa.html'; diff --git a/phpBB/phpbb/install/console/command/install/install.php b/phpBB/phpbb/install/console/command/install/install.php index 50c23f6877..de3a2e2d61 100644 --- a/phpBB/phpbb/install/console/command/install/install.php +++ b/phpBB/phpbb/install/console/command/install/install.php @@ -190,6 +190,7 @@ class install extends \phpbb\console\command\command $iohandler->set_input('email_enable', $config['email']['enabled']); $iohandler->set_input('smtp_delivery', $config['email']['smtp_delivery']); $iohandler->set_input('smtp_host', $config['email']['smtp_host']); + $iohandler->set_input('smtp_port', $config['email']['smtp_port']); $iohandler->set_input('smtp_auth', $config['email']['smtp_auth']); $iohandler->set_input('smtp_user', $config['email']['smtp_user']); $iohandler->set_input('smtp_pass', $config['email']['smtp_pass']); diff --git a/phpBB/phpbb/install/installer_configuration.php b/phpBB/phpbb/install/installer_configuration.php index ab02da8686..c660c99d0f 100644 --- a/phpBB/phpbb/install/installer_configuration.php +++ b/phpBB/phpbb/install/installer_configuration.php @@ -93,6 +93,9 @@ class installer_configuration implements ConfigurationInterface ->scalarNode('smtp_host') ->defaultValue(null) ->end() + ->scalarNode('smtp_port') + ->defaultValue(null) + ->end() ->scalarNode('smtp_auth') ->defaultValue(null) ->end() diff --git a/phpBB/phpbb/install/module/install_database/task/add_config_settings.php b/phpBB/phpbb/install/module/install_database/task/add_config_settings.php index 7a2df01de6..8002e3ed97 100644 --- a/phpBB/phpbb/install/module/install_database/task/add_config_settings.php +++ b/phpBB/phpbb/install/module/install_database/task/add_config_settings.php @@ -191,6 +191,10 @@ class add_config_settings extends \phpbb\install\task_base WHERE config_name = 'smtp_host'", 'UPDATE ' . $this->config_table . " + SET config_value = '" . $this->db->sql_escape($this->install_config->get('smtp_port')) . "' + WHERE config_name = 'smtp_port'", + + 'UPDATE ' . $this->config_table . " SET config_value = '" . $this->db->sql_escape($this->install_config->get('smtp_auth')) . "' WHERE config_name = 'smtp_auth_method'", diff --git a/phpBB/phpbb/install/module/obtain_data/task/obtain_email_data.php b/phpBB/phpbb/install/module/obtain_data/task/obtain_email_data.php index 606e4a2ddd..1cb4f04297 100644 --- a/phpBB/phpbb/install/module/obtain_data/task/obtain_email_data.php +++ b/phpBB/phpbb/install/module/obtain_data/task/obtain_email_data.php @@ -51,6 +51,7 @@ class obtain_email_data extends \phpbb\install\task_base implements \phpbb\insta $email_enable = $this->io_handler->get_input('email_enable', true); $smtp_delivery = $this->io_handler->get_input('smtp_delivery', ''); $smtp_host = $this->io_handler->get_input('smtp_host', ''); + $smtp_port = $this->io_handler->get_input('smtp_port', ''); $smtp_auth = $this->io_handler->get_input('smtp_auth', ''); $smtp_user = $this->io_handler->get_input('smtp_user', ''); $smtp_passwd = $this->io_handler->get_input('smtp_pass', ''); @@ -63,6 +64,7 @@ class obtain_email_data extends \phpbb\install\task_base implements \phpbb\insta $this->install_config->set('email_enable', $email_enable); $this->install_config->set('smtp_delivery', $smtp_delivery); $this->install_config->set('smtp_host', $smtp_host); + $this->install_config->set('smtp_port', $smtp_port); $this->install_config->set('smtp_auth', $smtp_auth); $this->install_config->set('smtp_user', $smtp_user); $this->install_config->set('smtp_pass', $smtp_passwd); @@ -119,6 +121,11 @@ class obtain_email_data extends \phpbb\install\task_base implements \phpbb\insta 'type' => 'text', 'default' => $smtp_host, ), + 'smtp_port' => array( + 'label' => 'SMTP_PORT', + 'type' => 'text', + 'default' => $smtp_port, + ), 'smtp_auth' => array( 'label' => 'SMTP_AUTH_METHOD', 'description' => 'SMTP_AUTH_METHOD_EXPLAIN', |