diff options
author | PayBas <contact@paybas.com> | 2014-04-14 17:04:18 +0200 |
---|---|---|
committer | PayBas <contact@paybas.com> | 2014-09-15 14:43:39 +0200 |
commit | 60c9955f514fcd5e5cde650bb7be0cf051b89b95 (patch) | |
tree | 0e2dfcd76a87cc58c85ce4cd69fba8f1442b0008 /phpBB/includes/acp/acp_board.php | |
parent | ae63843647d309d2deb2863189699212e9a3aa27 (diff) | |
download | forums-60c9955f514fcd5e5cde650bb7be0cf051b89b95.tar forums-60c9955f514fcd5e5cde650bb7be0cf051b89b95.tar.gz forums-60c9955f514fcd5e5cde650bb7be0cf051b89b95.tar.bz2 forums-60c9955f514fcd5e5cde650bb7be0cf051b89b95.tar.xz forums-60c9955f514fcd5e5cde650bb7be0cf051b89b95.zip |
[ticket/12408] Code cleanup
Rebased to see if travis will finally play along
PHPBB3-12408
Diffstat (limited to 'phpBB/includes/acp/acp_board.php')
-rw-r--r-- | phpBB/includes/acp/acp_board.php | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index fd09cab94c..3a07978ac4 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -927,13 +927,11 @@ class acp_board function guest_style_get() { global $db; - - $style = false; - $sql = 'SELECT u.user_style - FROM ' . USERS_TABLE . ' u - WHERE u.user_id = ' . ANONYMOUS; - $result = $db->sql_query_limit($sql, 1); + $sql = 'SELECT user_style + FROM ' . USERS_TABLE . ' + WHERE user_id = ' . ANONYMOUS; + $result = $db->sql_query($sql); $style = (int) $db->sql_fetchfield('user_style'); $db->sql_freeresult($result); @@ -948,12 +946,8 @@ class acp_board { global $db; - $sql_ary = array( - 'user_style' => $style_id, - ); - $sql = 'UPDATE ' . USERS_TABLE . ' - SET user_style = ' . $style_id . ' + SET user_style = ' . (int) $style_id . ' WHERE user_id = ' . ANONYMOUS; $db->sql_query($sql); } |