From cd1aad477992a3816be285143a40e257be5b638c Mon Sep 17 00:00:00 2001
From: Meik Sievertsen <acydburn@phpbb.com>
Date: Thu, 18 Sep 2008 14:17:08 +0000
Subject: Set secure cookie for style switcher if required. (Bug #19625)

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8874 89ea8834-ac86-4346-8a33-228a782c2dd0
---
 phpBB/includes/functions.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'phpBB/includes')

diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index a68ada3540..3f269cfc2a 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3717,8 +3717,10 @@ function page_header($page_title = '', $display_online_list = true)
 		'T_STYLESHEET_LINK'		=> (!$user->theme['theme_storedb']) ? "{$phpbb_root_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : "{$phpbb_root_path}style.$phpEx?sid=$user->session_id&amp;id=" . $user->theme['style_id'] . '&amp;lang=' . $user->data['user_lang'],
 		'T_STYLESHEET_NAME'		=> $user->theme['theme_name'],
 
-		'SITE_LOGO_IMG'			=> $user->img('site_logo'))
-	);
+		'SITE_LOGO_IMG'			=> $user->img('site_logo'),
+
+		'A_COOKIE_SETTINGS'		=> addslashes('; path=' . $config['cookie_path'] . ((!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain']) . ((!$config['cookie_secure']) ? '' : '; secure')),
+	));
 
 	// application/xhtml+xml not used because of IE
 	header('Content-type: text/html; charset=UTF-8');
-- 
cgit v1.2.1