1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

- 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/branches/phpBB-3_0_0@8911 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2008-09-23 13:03:33 +00:00
parent 38afbf6759
commit 4a3db854b7
21 changed files with 138 additions and 31 deletions

View File

@@ -315,8 +315,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
@@ -385,6 +383,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'];
@@ -432,6 +432,9 @@ function user_delete($mode, $user_id, $post_username = false)
$db->sql_query($sql);
}
}
$db->sql_transaction('commit');
break;
case 'remove':
@@ -485,6 +488,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)
@@ -553,6 +558,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)
{
@@ -565,8 +572,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;
}
@@ -2350,12 +2355,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)