aboutsummaryrefslogtreecommitdiff
path: root/phpBB
diff options
context:
space:
mode:
author3D-I <480857+3D-I@users.noreply.github.com>2020-01-10 23:22:24 +0100
committer3D-I <480857+3D-I@users.noreply.github.com>2020-01-10 23:23:15 +0100
commitf26e20e1e9d8b41da835e8f90ffee17184259fe4 (patch)
tree5dc82d4e8bd83e74f58528d0f364c2e97a07cdcf /phpBB
parent[ticket/16308] Fix UCP reset password (diff)
downloadphpbb-f26e20e1e9d8b41da835e8f90ffee17184259fe4.tar.gz
phpbb-f26e20e1e9d8b41da835e8f90ffee17184259fe4.tar.bz2
phpbb-f26e20e1e9d8b41da835e8f90ffee17184259fe4.zip
[ticket/16308] Fix UCP reset password
remove HTML from PHP and code beautify PHPBB3-16308
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/phpbb/ucp/controller/reset_password.php3
-rw-r--r--phpBB/styles/prosilver/template/ucp_reset_password.html2
2 files changed, 2 insertions, 3 deletions
diff --git a/phpBB/phpbb/ucp/controller/reset_password.php b/phpBB/phpbb/ucp/controller/reset_password.php
index 8877a33ba9..d20fafb2a8 100644
--- a/phpBB/phpbb/ucp/controller/reset_password.php
+++ b/phpBB/phpbb/ucp/controller/reset_password.php
@@ -425,8 +425,7 @@ class reset_password
}
$this->template->assign_vars([
- 'S_PASSWORD_RESET_ERRORS' => (bool) !empty($errors),
- 'PASSWORD_RESET_ERRORS' => implode('<br>', array_map([$this->language, 'lang'], $errors)),
+ 'PASSWORD_RESET_ERRORS' => !empty($errors) ? array_map([$this->language, 'lang'], $errors) : '',
'S_IS_PASSWORD_RESET' => true,
'U_RESET_PASSWORD_ACTION' => $this->helper->route('phpbb_ucp_reset_password_controller'),
'S_HIDDEN_FIELDS' => build_hidden_fields([
diff --git a/phpBB/styles/prosilver/template/ucp_reset_password.html b/phpBB/styles/prosilver/template/ucp_reset_password.html
index 5273d30d0f..439ebdf1df 100644
--- a/phpBB/styles/prosilver/template/ucp_reset_password.html
+++ b/phpBB/styles/prosilver/template/ucp_reset_password.html
@@ -10,7 +10,7 @@
<fieldset>
{% if S_IS_PASSWORD_RESET %}
- {% if S_PASSWORD_RESET_ERRORS %}<p class="error">{{ PASSWORD_RESET_ERRORS }}</p>{% endif %}
+ {% if PASSWORD_RESET_ERRORS %}<p class="error">{{ PASSWORD_RESET_ERRORS | join('<br>') | raw }}</p>{% endif %}
<dl>
<dt><label for="new_password">{{ lang('NEW_PASSWORD') ~ lang('COLON') }}</label></dt>
<dd><input type="password" name="new_password" id="new_password" size="25" maxlength="255" title="{{ lang('CHANGE_PASSWORD') }}" autocomplete="off" /></dd>