aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_pm_compose.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-11-02 15:28:00 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-11-02 15:28:00 +0000
commit43940870f6d049cc87bf08dc411b58caf161bec4 (patch)
treeba59d95771de96cab623914b488b9b53b160ea90 /phpBB/includes/ucp/ucp_pm_compose.php
parent75539560e20ac6610d04faa7d4e21b06ee99b206 (diff)
downloadforums-43940870f6d049cc87bf08dc411b58caf161bec4.tar
forums-43940870f6d049cc87bf08dc411b58caf161bec4.tar.gz
forums-43940870f6d049cc87bf08dc411b58caf161bec4.tar.bz2
forums-43940870f6d049cc87bf08dc411b58caf161bec4.tar.xz
forums-43940870f6d049cc87bf08dc411b58caf161bec4.zip
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
Diffstat (limited to 'phpBB/includes/ucp/ucp_pm_compose.php')
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php18
1 files changed, 18 insertions, 0 deletions
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);