From 43940870f6d049cc87bf08dc411b58caf161bec4 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 2 Nov 2008 15:28:00 +0000 Subject: [PATCH] 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 --- phpBB/includes/ucp/ucp_pm_compose.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 9ff473a66c..060baaefa0 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -419,6 +419,24 @@ function compose_pm($id, $mode, $action) $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_message_list_actions($address_list, $error, $remove_u, $remove_g, $add_to, $add_bcc);