From ffb911d1e1160986a34fc46065299a4b832b9eb8 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Mon, 14 May 2001 15:10:05 +0000 Subject: [PATCH] Altered SQL slightly for Postgres git-svn-id: file:///svn/phpbb/trunk@293 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/profile.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/profile.php b/phpBB/profile.php index a226605078..ca1941b6af 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -42,9 +42,9 @@ function validate_username($username) global $db; - $sql = "SELECT LOWER(u.username), d.disallow_username + $sql = "SELECT u.username, d.disallow_username FROM ".USERS_TABLE." u, ".DISALLOW_TABLE." d - WHERE u.username = '".strtolower($username)."' + WHERE LOWER(u.username) = '".strtolower($username)."' OR d.disallow_username = '$username'"; if($result = $db->sql_query($sql)) { @@ -91,7 +91,7 @@ function template_select($default) { if($file == $default) { - $selected = " SELECTED"; + $selected = " selected"; } $template_select .= "\n"; } @@ -527,7 +527,7 @@ switch($mode) $user_theme = ($HTTP_POST_VARS['theme']) ? $HTTP_POST_VARS['theme'] : $board_config['default_theme']; $user_lang = ($HTTP_POST_VARS['language']) ? $HTTP_POST_VARS['language'] : $board_config['default_lang']; - $user_timezone = (isset($HTTP_POST_VARS['timezone'])) ? $HTTP_POST_VARS['timezone'] : $board_config['default_timezone']; + $user_timezone = str_replace("+", "", (isset($HTTP_POST_VARS['timezone'])) ? $HTTP_POST_VARS['timezone'] : $board_config['default_timezone']); $user_template = ($HTTP_POST_VARS['template']) ? $HTTP_POST_VARS['template'] : $board_config['default_template']; $user_dateformat = ($HTTP_POST_VARS['dateformat']) ? trim($HTTP_POST_VARS['dateformat']) : $board_config['default_dateformat'];