diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-01-22 13:06:13 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-01-22 13:06:13 +0000 |
| commit | ec959d00014ba92466b676e0a32d662e629825e5 (patch) | |
| tree | 2b8c6998576ff33af61c5263c6f5a2cab43697f6 /phpBB/includes/session.php | |
| parent | 0650bd4d0d62343b1c137c865bcb8f91468a33d0 (diff) | |
| download | forums-ec959d00014ba92466b676e0a32d662e629825e5.tar forums-ec959d00014ba92466b676e0a32d662e629825e5.tar.gz forums-ec959d00014ba92466b676e0a32d662e629825e5.tar.bz2 forums-ec959d00014ba92466b676e0a32d662e629825e5.tar.xz forums-ec959d00014ba92466b676e0a32d662e629825e5.zip | |
- size select fix
- introduced function for building group options (acp)
- fixed acl_getf if negated option needs to be retrieved
- only using one function for updating post informations
- fixing module display if module is disabled
- if user is having a non-existent style do not print out error message, instead fix the users value and load the default style
git-svn-id: file:///svn/phpbb/trunk@5486 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/session.php')
| -rw-r--r-- | phpBB/includes/session.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 532382cc4d..21da3a82ed 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -789,6 +789,27 @@ class user extends session $this->theme = $db->sql_fetchrow($result); $db->sql_freeresult($result); + // User has wrong style + if (!$this->theme && $style == $this->data['user_style']) + { + $style = $this->data['user_style'] = $config['default_style']; + + $sql = 'UPDATE ' . USERS_TABLE . " + SET user_style = $style + WHERE user_id = {$this->data['user_id']}"; + $db->sql_query($sql); + + $sql = 'SELECT s.style_id, t.*, c.*, i.* + FROM ' . STYLES_TABLE . ' s, ' . STYLES_TPL_TABLE . ' t, ' . STYLES_CSS_TABLE . ' c, ' . STYLES_IMAGE_TABLE . " i + WHERE s.style_id = $style + AND t.template_id = s.template_id + AND c.theme_id = s.theme_id + AND i.imageset_id = s.imageset_id"; + $result = $db->sql_query($sql); + $this->theme = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + } + if (!$this->theme) { trigger_error('Could not get style data', E_USER_ERROR); |
