aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/session.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-04-30 15:35:12 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-04-30 15:35:12 +0000
commit00a63fa813601877377ab746aa95429ba9846b43 (patch)
tree30365851d7dc70c4b30983c97290144871ebd4e9 /phpBB/includes/session.php
parent35cf64c370ddc9dbae6ea211ae2a2849e071ea98 (diff)
downloadforums-00a63fa813601877377ab746aa95429ba9846b43.tar
forums-00a63fa813601877377ab746aa95429ba9846b43.tar.gz
forums-00a63fa813601877377ab746aa95429ba9846b43.tar.bz2
forums-00a63fa813601877377ab746aa95429ba9846b43.tar.xz
forums-00a63fa813601877377ab746aa95429ba9846b43.zip
#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
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r--phpBB/includes/session.php13
1 files changed, 9 insertions, 4 deletions
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';