aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/style.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/style.php')
-rw-r--r--phpBB/style.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/style.php b/phpBB/style.php
index 38ffd5426b..150261aba6 100644
--- a/phpBB/style.php
+++ b/phpBB/style.php
@@ -71,7 +71,7 @@ if ($id && $sid)
$config = $cache->obtain_config();
- $sql = 'SELECT s.session_id, u.user_lang
+ $sql = 'SELECT u.user_id, u.user_lang
FROM ' . SESSIONS_TABLE . ' s, ' . USERS_TABLE . " u
WHERE s.session_id = '" . $db->sql_escape($sid) . "'
AND s.session_user_id = u.user_id";
@@ -91,6 +91,11 @@ if ($id && $sid)
$theme = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
+ if ($user['user_id'] == ANONYMOUS)
+ {
+ $user['user_lang'] = $config['default_lang'];
+ }
+
$sql = 'SELECT *
FROM ' . STYLES_IMAGESET_DATA_TABLE . '
WHERE imageset_id = ' . $theme['imageset_id'] . "