aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-05-02 21:21:07 +0200
committerMarc Alexander <admin@m-a-styles.de>2019-05-02 21:21:07 +0200
commit3c822556c137a8517dd6a34963bced89b2a150ed (patch)
tree95513ac6d0bb3dc7044e684ce836f568341a33c6 /phpBB/includes/functions.php
parentdc1085335675475e817a72ae89504d14dd5f9a9f (diff)
downloadforums-3c822556c137a8517dd6a34963bced89b2a150ed.tar
forums-3c822556c137a8517dd6a34963bced89b2a150ed.tar.gz
forums-3c822556c137a8517dd6a34963bced89b2a150ed.tar.bz2
forums-3c822556c137a8517dd6a34963bced89b2a150ed.tar.xz
forums-3c822556c137a8517dd6a34963bced89b2a150ed.zip
[ticket/16042] Use S_LOGIN_REDIRECT to output login form token
PHPBB3-16042
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 9032b79cbf..f39b24d94a 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -4439,6 +4439,18 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
$controller_helper = $phpbb_container->get('controller.helper');
$notification_mark_hash = generate_link_hash('mark_all_notifications_read');
+ /**
+ * Workaround for missing template variable in pre phpBB 3.2.6 styles.
+ * @deprecated 3.2.7 (To be removed: 3.3.0-a1)
+ */
+ $form_token_login = $template->retrieve_var('S_FORM_TOKEN_LOGIN');
+ $s_login_redirect = build_hidden_fields(array('redirect' => $phpbb_path_helper->remove_web_root_path(build_url())));
+ if (!empty($form_token_login))
+ {
+ $s_login_redirect .= $form_token_login;
+ $template->assign_var('S_FORM_TOKEN_LOGIN', '');
+ }
+
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
'SITENAME' => $config['sitename'],
@@ -4528,7 +4540,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
'S_TOPIC_ID' => $topic_id,
'S_LOGIN_ACTION' => ((!defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("{$phpbb_admin_path}index.$phpEx", false, true, $user->session_id)),
- 'S_LOGIN_REDIRECT' => build_hidden_fields(array('redirect' => $phpbb_path_helper->remove_web_root_path(build_url()))),
+ 'S_LOGIN_REDIRECT' => $s_login_redirect,
'S_ENABLE_FEEDS' => ($config['feed_enable']) ? true : false,
'S_ENABLE_FEEDS_OVERALL' => ($config['feed_overall']) ? true : false,