diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-05-12 20:52:58 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-05-12 20:52:58 +0000 |
commit | a8d99f2228cc042c8410553f5f3ec375148552f5 (patch) | |
tree | 11ccbd184cbc222775a08852d633d74ced7b2695 /phpBB/includes/functions_user.php | |
parent | 7dd067bf5a532e4c30908cca24449274a4863326 (diff) | |
download | forums-a8d99f2228cc042c8410553f5f3ec375148552f5.tar forums-a8d99f2228cc042c8410553f5f3ec375148552f5.tar.gz forums-a8d99f2228cc042c8410553f5f3ec375148552f5.tar.bz2 forums-a8d99f2228cc042c8410553f5f3ec375148552f5.tar.xz forums-a8d99f2228cc042c8410553f5f3ec375148552f5.zip |
- introduce new function build_url to easily build a valid url from the user->page object as well as optionally removing certain keys
- changed attachment config to utilize the config build methods
- cleaned up posting.php
- the submit/delete_post functions are now usable (functions_posting.php)
- adjusted header icons (transparency)
- a bunch of fixes for mssql
- bug fixes
git-svn-id: file:///svn/phpbb/trunk@5902 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index b722549720..533f7b9ef7 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -139,6 +139,7 @@ function user_delete($mode, $user_id, $post_username = false) GROUP BY topic_id"; $result = $db->sql_query($sql); + $topic_id_ary = array(); while ($row = $db->sql_fetchrow($result)) { $topic_id_ary[$row['topic_id']] = $row['total_posts']; @@ -199,7 +200,7 @@ function user_delete($mode, $user_id, $post_username = false) set_config('newest_user_id', $row['user_id']); set_config('newest_username', $row['username']); } - $db->freeresult($result); + $db->sql_freeresult($result); } set_config('num_users', $config['num_users'] - 1, true); @@ -1226,6 +1227,12 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow { if (isset($group_attributes[$attribute]) && !in_array($attribute, $group_only_ary)) { + // If we are about to set an avatar, we will not overwrite user avatars if no group avatar is set... + if (strpos($attribute, 'group_avatar') === 0 && !$group_attributes[$attribute]) + { + continue; + } + $sql_ary[str_replace('group', 'user', $attribute)] = $group_attributes[$attribute]; } } @@ -1618,6 +1625,12 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal { if (isset($group_attributes[$attribute])) { + // If we are about to set an avatar, we will not overwrite user avatars if no group avatar is set... + if (strpos($attribute, 'group_avatar') === 0 && !$group_attributes[$attribute]) + { + continue; + } + settype($group_attributes[$attribute], $type); $sql_ary[str_replace('group_', 'user_', $attribute)] = $group_attributes[$attribute]; } |