additionally to the default "reply to all" behaviour, increase max_recipients to the number of people within the list if they exceed the limit.

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9045 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2008-11-02 15:28:00 +00:00
parent 75539560e2
commit 43940870f6

View file

@ -419,6 +419,24 @@ function compose_pm($id, $mode, $action)
$max_recipients = (!$max_recipients) ? $config['pm_max_recipients'] : $max_recipients; $max_recipients = (!$max_recipients) ? $config['pm_max_recipients'] : $max_recipients;
// If this is a quote/reply "to all"... we may increase the max_recpients to the number of original recipients
if (($action == 'reply' || $action == 'quote') && $max_recipients)
{
// We try to include every previously listed member from the TO Header
$list = rebuild_header(array('to' => $post['to_address']));
$list = $list['u'];
$list[$post['author_id']] = 'to';
if (isset($list[$user->data['user_id']]))
{
unset($list[$user->data['user_id']]);
}
$max_recipients = ($max_recipients < sizeof($list)) ? sizeof($list) : $max_recipients;
unset($list);
}
// Handle User/Group adding/removing // Handle User/Group adding/removing
handle_message_list_actions($address_list, $error, $remove_u, $remove_g, $add_to, $add_bcc); handle_message_list_actions($address_list, $error, $remove_u, $remove_g, $add_to, $add_bcc);