diff options
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r-- | phpBB/includes/ucp/ucp_activate.php | 17 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 4 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_zebra.php | 10 |
3 files changed, 23 insertions, 8 deletions
diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php index c837975fa4..f9f39f4663 100644 --- a/phpBB/includes/ucp/ucp_activate.php +++ b/phpBB/includes/ucp/ucp_activate.php @@ -105,8 +105,21 @@ class ucp_activate if (!$update_password) { - set_config('newest_user_id', $row['user_id'], true); - set_config('newest_username', $row['username'], true); + // Get latest username + $sql = 'SELECT user_id, username + FROM ' . USERS_TABLE . ' + WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') + ORDER BY user_id DESC'; + $result = $db->sql_query_limit($sql, 1); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($row) + { + set_config('newest_user_id', $row['user_id'], true); + set_config('newest_username', $row['username'], true); + } + set_config('num_users', $config['num_users'] + 1, true); } diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 8488f30968..7f593a26a5 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -475,7 +475,9 @@ class ucp_profile 'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']), 'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'], - 'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],) + 'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'], + 'S_BBCODE_IMG' => ($config['allow_sig_img']) ? true : false, + 'S_BBCODE_FLASH' => ($config['allow_sig_flash']) ? true : false) ); // Build custom bbcodes array diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php index 60d8822a00..9b2de97b8e 100644 --- a/phpBB/includes/ucp/ucp_zebra.php +++ b/phpBB/includes/ucp/ucp_zebra.php @@ -45,7 +45,7 @@ class ucp_zebra if ($data['add'] && !sizeof($error)) { - $data['add'] = explode("\n", $data['add']); + $data['add'] = array_map('strtolower', explode("\n", $data['add'])); // Do these name/s exist on a list already? If so, ignore ... we could be // 'nice' and automatically handle names added to one list present on @@ -62,16 +62,16 @@ class ucp_zebra { if ($row['friend']) { - $friends[] = $row['username']; + $friends[] = strtolower($row['username']); } else { - $foes[] = $row['username']; + $foes[] = strtolower($row['username']); } } $db->sql_freeresult($result); - $data['add'] = array_diff($data['add'], $friends, $foes, array($user->data['username'])); + $data['add'] = array_diff($data['add'], $friends, $foes, array(strtolower($user->data['username']))); unset($friends, $foes); $data['add'] = implode(', ', preg_replace('#^[\s]*?(.*?)[\s]*?$#e', "\"'\" . \$db->sql_escape('\\1') . \"'\"", $data['add'])); @@ -80,7 +80,7 @@ class ucp_zebra { $sql = 'SELECT user_id, user_type FROM ' . USERS_TABLE . ' - WHERE username IN (' . $data['add'] . ') + WHERE LOWER(username) IN (' . $data['add'] . ') AND user_type NOT IN (' . USER_IGNORE . ', ' . USER_INACTIVE . ')'; $result = $db->sql_query($sql); |