From 00a63fa813601877377ab746aa95429ba9846b43 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 30 Apr 2007 15:35:12 +0000 Subject: #10283 - no style if banning anonymous/ip and using style requiring stylesheet parsing. Also fixes a bug for non-parsed THEME_DATA... git-svn-id: file:///svn/phpbb/trunk@7439 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/session.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/session.php') diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index bc608426b9..37b251cdaf 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -914,6 +914,8 @@ class session if ($banned && !$return) { + global $template; + // If the session is empty we need to create a valid one... if (empty($this->session_id)) { @@ -934,12 +936,12 @@ class session { global $phpEx; - // Set as a precaution to allow login_box() handling this case correctly as well as this function not being executed again. - define('IN_CHECK_BAN', 1); - $this->setup('ucp'); $this->data['is_registered'] = $this->data['is_bot'] = false; + // Set as a precaution to allow login_box() handling this case correctly as well as this function not being executed again. + define('IN_CHECK_BAN', 1); + login_box("index.$phpEx"); // The false here is needed, else the user is able to circumvent the ban. @@ -948,11 +950,14 @@ class session // Ok, we catch the case of an empty session id for the anonymous user... // This can happen if the user is logging in, banned by username and the login_box() being called "again". - if (empty($this->session_id)) + if (empty($this->session_id) && defined('IN_CHECK_BAN')) { $this->session_create(ANONYMOUS); } + // Because we never have a fully working session we need to embed the style + $template->assign_var('S_FORCE_EMBED_STYLE', true); + // Determine which message to output $till_date = ($ban_row['ban_end']) ? $this->format_date($ban_row['ban_end']) : ''; $message = ($ban_row['ban_end']) ? 'BOARD_BAN_TIME' : 'BOARD_BAN_PERM'; -- cgit v1.2.1