diff options
author | Tristan Darricau <tristan.darricau@gmail.com> | 2018-07-08 17:38:27 +0200 |
---|---|---|
committer | Tristan Darricau <tristan.darricau@gmail.com> | 2018-07-08 17:38:27 +0200 |
commit | bc7b99863226dd58a18fa0a411c119560c493850 (patch) | |
tree | 82f3219e10ba377bf6b1fc5d037b62eb0e07ad2b /phpBB/includes/functions.php | |
parent | 9b56a28be0cfb0de66fb34c5a2965f965761e6e1 (diff) | |
parent | 43d7f15a25841c8e66933b4c0e8ba28b78c6aef7 (diff) | |
download | forums-bc7b99863226dd58a18fa0a411c119560c493850.tar forums-bc7b99863226dd58a18fa0a411c119560c493850.tar.gz forums-bc7b99863226dd58a18fa0a411c119560c493850.tar.bz2 forums-bc7b99863226dd58a18fa0a411c119560c493850.tar.xz forums-bc7b99863226dd58a18fa0a411c119560c493850.zip |
Merge branch 'prep-release-3.2.3' into 3.2.x
* prep-release-3.2.3:
[ticket/15676] Use paragraphs and classes as suggested by hanakin
[ticket/15676] Use twig syntax
[ticket/15676] Simplify link text and use privacy link in cookie notice
[ticket/15676] Display privacy notice in footer & allow overriding U_PRIVACY
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 97f25cc701..292036d5a8 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2469,7 +2469,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa $s_hidden_fields = build_hidden_fields($s_hidden_fields); - $template->assign_vars(array( + $login_box_template_data = array( 'LOGIN_ERROR' => $err, 'LOGIN_EXPLAIN' => $l_explain, @@ -2477,6 +2477,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa 'U_RESEND_ACTIVATION' => ($config['require_activation'] == USER_ACTIVATION_SELF && $config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=resend_act') : '', 'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'), 'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'), + 'UA_PRIVACY' => addslashes(append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy')), 'S_DISPLAY_FULL_LOGIN' => ($s_display) ? true : false, 'S_HIDDEN_FIELDS' => $s_hidden_fields, @@ -2486,7 +2487,29 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa 'USERNAME_CREDENTIAL' => 'username', 'PASSWORD_CREDENTIAL' => ($admin) ? 'password_' . $credential : 'password', - )); + ); + + /** + * Event to add/modify login box template data + * + * @event core.login_box_modify_template_data + * @var int admin Flag whether user is admin + * @var string username User name + * @var int autologin Flag whether autologin is enabled + * @var string redirect Redirect URL + * @var array login_box_template_data Array with the login box template data + * @since 3.2.3-RC2 + */ + $vars = array( + 'admin', + 'username', + 'autologin', + 'redirect', + 'login_box_template_data', + ); + extract($phpbb_dispatcher->trigger_event('core.login_box_modify_template_data', compact($vars))); + + $template->assign_vars($login_box_template_data); page_header($user->lang['LOGIN']); @@ -4410,6 +4433,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id = 'U_TEAM' => ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team'), 'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'), 'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'), + 'UA_PRIVACY' => addslashes(append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy')), 'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '', 'U_FEED' => $controller_helper->route('phpbb_feed_index'), |