diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2008-09-23 13:11:34 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2008-09-23 13:11:34 +0000 |
| commit | ce6b87ccec8a92c5455871446f88b122019672e9 (patch) | |
| tree | 2e8acf0fe3e28ac79c7d8f54b2bceda2eaf05ec1 /phpBB/includes/functions_user.php | |
| parent | b486710ea127ca055ac1cb117f056e837a32370f (diff) | |
| download | forums-ce6b87ccec8a92c5455871446f88b122019672e9.tar forums-ce6b87ccec8a92c5455871446f88b122019672e9.tar.gz forums-ce6b87ccec8a92c5455871446f88b122019672e9.tar.bz2 forums-ce6b87ccec8a92c5455871446f88b122019672e9.tar.xz forums-ce6b87ccec8a92c5455871446f88b122019672e9.zip | |
- Automatically add users/groups to the PM recipient list, if entered or selected.
- Reply to PM now includes all previous recipients and not only the original sender.
- Added 'max_recipients' setting for private messages. This setting allows admins to define the maximum number of recipients per private message with a board-wide setting and a group-specific setting.
- Added new permission setting for sending private messages to groups. Now there are two permissions to define sending private messages to multiple recipients and private messages to groups.
git-svn-id: file:///svn/phpbb/trunk@8914 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_user.php')
| -rw-r--r-- | phpBB/includes/functions_user.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index ee4fa3f805..a39638bbf2 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -314,8 +314,6 @@ function user_delete($mode, $user_id, $post_username = false) return false; } - $db->sql_transaction('begin'); - // Before we begin, we will remove the reports the user issued. $sql = 'SELECT r.post_id, p.topic_id FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p @@ -384,6 +382,8 @@ function user_delete($mode, $user_id, $post_username = false) { case 'retain': + $db->sql_transaction('begin'); + if ($post_username === false) { $post_username = $user->lang['GUEST']; @@ -431,6 +431,9 @@ function user_delete($mode, $user_id, $post_username = false) $db->sql_query($sql); } } + + $db->sql_transaction('commit'); + break; case 'remove': @@ -484,6 +487,8 @@ function user_delete($mode, $user_id, $post_username = false) break; } + $db->sql_transaction('begin'); + $table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE); foreach ($table_ary as $table) @@ -552,6 +557,8 @@ function user_delete($mode, $user_id, $post_username = false) $db->sql_query($sql); } + $db->sql_transaction('commit'); + // Reset newest user info if appropriate if ($config['newest_user_id'] == $user_id) { @@ -564,8 +571,6 @@ function user_delete($mode, $user_id, $post_username = false) set_config('num_users', $config['num_users'] - 1, true); } - $db->sql_transaction('commit'); - return false; } @@ -2274,12 +2279,13 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow 'group_receive_pm' => 'int', 'group_legend' => 'int', 'group_message_limit' => 'int', + 'group_max_recipients' => 'int', 'group_founder_manage' => 'int', ); // Those are group-only attributes - $group_only_ary = array('group_receive_pm', 'group_legend', 'group_message_limit', 'group_founder_manage'); + $group_only_ary = array('group_receive_pm', 'group_legend', 'group_message_limit', 'group_max_recipients', 'group_founder_manage'); // Check data. Limit group name length. if (!utf8_strlen($name) || utf8_strlen($name) > 60) |
