mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
- 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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user