aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-08-04 14:15:13 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-08-04 14:15:13 +0000
commit6cd6a907c7d8503896a46f710bb75370f1abcf43 (patch)
tree2ccec67b2d266917b7125fbb857dcea0f41f3e3a /phpBB/includes
parent0e98a3aee813b4f83b1021d8204b38ba7fd319f0 (diff)
downloadforums-6cd6a907c7d8503896a46f710bb75370f1abcf43.tar
forums-6cd6a907c7d8503896a46f710bb75370f1abcf43.tar.gz
forums-6cd6a907c7d8503896a46f710bb75370f1abcf43.tar.bz2
forums-6cd6a907c7d8503896a46f710bb75370f1abcf43.tar.xz
forums-6cd6a907c7d8503896a46f710bb75370f1abcf43.zip
Separate PM Reply and PM Reply to all in prosilver.
Style changes by dhn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9919 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php12
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php7
2 files changed, 15 insertions, 4 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index cf82925e1d..2f7c289653 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -46,6 +46,9 @@ function compose_pm($id, $mode, $action)
$draft_id = request_var('d', 0);
$lastclick = request_var('lastclick', 0);
+ // Reply to all triggered (quote/reply)
+ $reply_to_all = request_var('reply_to_all', 0);
+
// Do NOT use request_var or specialchars here
$address_list = isset($_REQUEST['address_list']) ? $_REQUEST['address_list'] : array();
@@ -84,7 +87,7 @@ function compose_pm($id, $mode, $action)
}
redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'));
}
-
+
// Since viewtopic.php language entries are used in several modes,
// we include the language file here
$user->add_lang('viewtopic');
@@ -314,13 +317,14 @@ function compose_pm($id, $mode, $action)
if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !sizeof($address_list) && !$refresh && !$submit && !$preview)
{
- if ($action == 'quotepost')
+ // Add the original author as the recipient if quoting a post or only replying and not having checked "reply to all"
+ if ($action == 'quotepost' || !$reply_to_all)
{
$address_list = array('u' => array($post['author_id'] => 'to'));
}
else
{
- // We try to include every previously listed member from the TO Header
+ // We try to include every previously listed member from the TO Header - Reply to all
$address_list = rebuild_header(array('to' => $post['to_address']));
// Add the author (if he is already listed then this is no shame (it will be overwritten))
@@ -443,7 +447,7 @@ 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)
+ if (($action == 'reply' || $action == 'quote') && $max_recipients && $reply_to_all)
{
// We try to include every previously listed member from the TO Header
$list = rebuild_header(array('to' => $post['to_address']));
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index dd15f5ff37..0e51e268cf 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -169,6 +169,9 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
$url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');
+ // Number of "to" recipients
+ $num_recipients = (int) preg_match_all('/:?(u|g)_([0-9]+):?/', $message_row['to_address'], $match);
+
$template->assign_vars(array(
'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
@@ -215,13 +218,17 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&amp;mode=compose&amp;action=quote&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_EDIT' => (($message_row['message_time'] > time() - ($config['pm_edit_time'] * 60) || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit')) ? "$url&amp;mode=compose&amp;action=edit&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_POST_REPLY_PM' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
+ 'U_POST_REPLY_ALL' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;reply_to_all=1&amp;p=" . $message_row['msg_id'] : '',
'U_PREVIOUS_PM' => "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=previous",
'U_NEXT_PM' => "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=next",
+ 'U_PM_ACTION' => $url . '&amp;mode=compose&amp;f=' . $folder_id . '&amp;p=' . $message_row['msg_id'],
+
'S_HAS_ATTACHMENTS' => (sizeof($attachments)) ? true : false,
'S_DISPLAY_NOTICE' => $display_notice && $message_row['message_attachment'],
'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false,
'S_SPECIAL_FOLDER' => in_array($folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)),
+ 'S_PM_RECIPIENTS' => $num_recipients,
'U_PRINT_PM' => ($config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=print" : '',
'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_sendpm') && $auth->acl_get('u_pm_forward')) ? "$url&amp;mode=compose&amp;action=forward&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '')