aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorRubén Calvo <rubencm@gmail.com>2017-04-28 22:41:07 +0200
committerRubén Calvo <rubencm@gmail.com>2017-08-28 18:33:38 +0200
commit4719f94cecd8a3f585c9ca1c75336aa109849844 (patch)
treee7e30e0d9d42455f3688700da21f81149cdf48bb /phpBB
parent48a3bd1a9e1fe9c6a761b43a1058b4d3c1b6641b (diff)
downloadforums-4719f94cecd8a3f585c9ca1c75336aa109849844.tar
forums-4719f94cecd8a3f585c9ca1c75336aa109849844.tar.gz
forums-4719f94cecd8a3f585c9ca1c75336aa109849844.tar.bz2
forums-4719f94cecd8a3f585c9ca1c75336aa109849844.tar.xz
forums-4719f94cecd8a3f585c9ca1c75336aa109849844.zip
[ticket/15201] Remove wrong user style check
PHPBB3-15201
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/phpbb/db/migration/data/v310/style_update_p1.php8
-rw-r--r--phpBB/phpbb/user.php18
2 files changed, 4 insertions, 22 deletions
diff --git a/phpBB/phpbb/db/migration/data/v310/style_update_p1.php b/phpBB/phpbb/db/migration/data/v310/style_update_p1.php
index 2c7b7edf2e..dcf031a7a7 100644
--- a/phpBB/phpbb/db/migration/data/v310/style_update_p1.php
+++ b/phpBB/phpbb/db/migration/data/v310/style_update_p1.php
@@ -165,7 +165,7 @@ class style_update_p1 extends \phpbb\db\migration\migration
$this->config->set('default_style', $default_style);
- $sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = 0';
+ $sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = ' . $default_style;
$this->sql_query($sql);
}
else
@@ -183,9 +183,9 @@ class style_update_p1 extends \phpbb\db\migration\migration
}
// Reset styles for users
- $this->sql_query('UPDATE ' . USERS_TABLE . '
- SET user_style = 0
- WHERE ' . $this->db->sql_in_set('user_style', $valid_styles, true));
+ $this->sql_query('UPDATE ' . USERS_TABLE . "
+ SET user_style = '" . $valid_styles[0] . "'
+ WHERE " . $this->db->sql_in_set('user_style', $valid_styles, true));
}
}
}
diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php
index d4097f53ee..5899dff2f5 100644
--- a/phpBB/phpbb/user.php
+++ b/phpBB/phpbb/user.php
@@ -278,24 +278,6 @@ class user extends \phpbb\session
$db->sql_freeresult($result);
}
- // User has wrong style
- if (!$this->style && $style_id == $this->data['user_style'])
- {
- $style_id = $this->data['user_style'] = $config['default_style'];
-
- $sql = 'UPDATE ' . USERS_TABLE . "
- SET user_style = $style_id
- WHERE user_id = {$this->data['user_id']}";
- $db->sql_query($sql);
-
- $sql = 'SELECT *
- FROM ' . STYLES_TABLE . " s
- WHERE s.style_id = $style_id";
- $result = $db->sql_query($sql, 3600);
- $this->style = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
- }
-
if (!$this->style)
{
trigger_error('NO_STYLE_DATA', E_USER_ERROR);