mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-27 04:18:55 +00:00
[ticket/12408] Code cleanup
Rebased to see if travis will finally play along PHPBB3-12408
This commit is contained in:
parent
ae63843647
commit
60c9955f51
1 changed files with 5 additions and 11 deletions
|
@ -928,12 +928,10 @@ class acp_board
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
$style = false;
|
$sql = 'SELECT user_style
|
||||||
|
FROM ' . USERS_TABLE . '
|
||||||
$sql = 'SELECT u.user_style
|
WHERE user_id = ' . ANONYMOUS;
|
||||||
FROM ' . USERS_TABLE . ' u
|
$result = $db->sql_query($sql);
|
||||||
WHERE u.user_id = ' . ANONYMOUS;
|
|
||||||
$result = $db->sql_query_limit($sql, 1);
|
|
||||||
|
|
||||||
$style = (int) $db->sql_fetchfield('user_style');
|
$style = (int) $db->sql_fetchfield('user_style');
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
@ -948,12 +946,8 @@ class acp_board
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
$sql_ary = array(
|
|
||||||
'user_style' => $style_id,
|
|
||||||
);
|
|
||||||
|
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||||
SET user_style = ' . $style_id . '
|
SET user_style = ' . (int) $style_id . '
|
||||||
WHERE user_id = ' . ANONYMOUS;
|
WHERE user_id = ' . ANONYMOUS;
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue