Changeset 702 for trunk/forum/includes/ucp/ucp_pm_compose.php
- Timestamp:
- Mar 31, 2010, 6:32:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/forum/includes/ucp/ucp_pm_compose.php
r400 r702 3 3 * 4 4 * @package ucp 5 * @version $Id : ucp_pm_compose.php 9168 2008-12-03 16:48:06Z acydburn$5 * @version $Id$ 6 6 * @copyright (c) 2005 phpBB Group 7 7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License … … 47 47 $lastclick = request_var('lastclick', 0); 48 48 49 // Reply to all triggered (quote/reply) 50 $reply_to_all = request_var('reply_to_all', 0); 51 49 52 // Do NOT use request_var or specialchars here 50 53 $address_list = isset($_REQUEST['address_list']) ? $_REQUEST['address_list'] : array(); … … 85 88 redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm')); 86 89 } 90 91 // Since viewtopic.php language entries are used in several modes, 92 // we include the language file here 93 $user->add_lang('viewtopic'); 87 94 88 95 // Output PM_TO box if message composing … … 311 318 if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !sizeof($address_list) && !$refresh && !$submit && !$preview) 312 319 { 313 if ($action == 'quotepost') 320 // Add the original author as the recipient if quoting a post or only replying and not having checked "reply to all" 321 if ($action == 'quotepost' || !$reply_to_all) 314 322 { 315 323 $address_list = array('u' => array($post['author_id'] => 'to')); … … 317 325 else 318 326 { 319 // We try to include every previously listed member from the TO Header 327 // We try to include every previously listed member from the TO Header - Reply to all 320 328 $address_list = rebuild_header(array('to' => $post['to_address'])); 321 329 … … 440 448 441 449 // If this is a quote/reply "to all"... we may increase the max_recpients to the number of original recipients 442 if (($action == 'reply' || $action == 'quote') && $max_recipients )450 if (($action == 'reply' || $action == 'quote') && $max_recipients && $reply_to_all) 443 451 { 444 452 // We try to include every previously listed member from the TO Header … … 632 640 if ($load && $drafts) 633 641 { 634 load_drafts(0, 0, $id );642 load_drafts(0, 0, $id, $action, $msg_id); 635 643 } 636 644 … … 747 755 if (!sizeof($error) && $preview) 748 756 { 749 $user->add_lang('viewtopic');750 757 $preview_message = $message_parser->format_display($enable_bbcode, $enable_urls, $enable_smilies, false); 751 758 … … 761 768 $parse_sig->bbcode_bitfield = $preview_signature_bitfield; 762 769 763 $parse_sig->format_display($ enable_bbcode, $enable_urls, $enable_smilies);770 $parse_sig->format_display($config['allow_sig_bbcode'], $config['allow_sig_links'], $config['allow_sig_smilies']); 764 771 $preview_signature = $parse_sig->message; 765 772 unset($parse_sig); … … 805 812 806 813 // Decode text for message display 807 $bbcode_uid = (($action == 'quote' || $action == 'forward') && !$preview && !$refresh && !sizeof($error)) ? $bbcode_uid : $message_parser->bbcode_uid;814 $bbcode_uid = (($action == 'quote' || $action == 'forward') && !$preview && !$refresh && (!sizeof($error) || (sizeof($error) && !$submit))) ? $bbcode_uid : $message_parser->bbcode_uid; 808 815 809 816 $message_parser->decode_message($bbcode_uid); … … 851 858 $forward_text[] = $user->lang['FWD_ORIGINAL_MESSAGE']; 852 859 $forward_text[] = sprintf($user->lang['FWD_SUBJECT'], censor_text($message_subject)); 853 $forward_text[] = sprintf($user->lang['FWD_DATE'], $user->format_date($message_time ));860 $forward_text[] = sprintf($user->lang['FWD_DATE'], $user->format_date($message_time, false, true)); 854 861 $forward_text[] = sprintf($user->lang['FWD_FROM'], $quote_username_text); 855 862 $forward_text[] = sprintf($user->lang['FWD_TO'], implode(', ', $fwd_to_field['to'])); … … 1040 1047 'SMILIES_STATUS' => ($smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'], 1041 1048 'URL_STATUS' => ($url_status) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'], 1049 'MAX_FONT_SIZE' => (int) $config['max_post_font_size'], 1042 1050 'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['PM']), 1043 1051 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '', … … 1125 1133 1126 1134 // Build usernames to add 1127 $usernames = (isset($_REQUEST['username'])) ? array(request_var('username', '', true)) : array(); 1135 $usernames = request_var('username', '', true); 1136 $usernames = (empty($usernames)) ? array() : array($usernames); 1137 1128 1138 $username_list = request_var('username_list', '', true); 1129 1139 if ($username_list) … … 1139 1149 global $refresh, $submit, $preview; 1140 1150 1141 $refresh = $preview =true;1151 $refresh = true; 1142 1152 $submit = false; 1153 1154 // Preview is only true if there was also a message entered 1155 if (request_var('message', '')) 1156 { 1157 $preview = true; 1158 } 1143 1159 } 1144 1160
Note:
See TracChangeset
for help on using the changeset viewer.