Ignore:
Timestamp:
Mar 31, 2010, 6:32:40 PM (14 years ago)
Author:
george
Message:
  • Upraveno: Aktualizace fóra.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/forum/includes/ucp/ucp_pm_compose.php

    r400 r702  
    33*
    44* @package ucp
    5 * @version $Id: ucp_pm_compose.php 9168 2008-12-03 16:48:06Z acydburn $
     5* @version $Id$
    66* @copyright (c) 2005 phpBB Group
    77* @license http://opensource.org/licenses/gpl-license.php GNU Public License
     
    4747        $lastclick              = request_var('lastclick', 0);
    4848
     49        // Reply to all triggered (quote/reply)
     50        $reply_to_all   = request_var('reply_to_all', 0);
     51
    4952        // Do NOT use request_var or specialchars here
    5053        $address_list   = isset($_REQUEST['address_list']) ? $_REQUEST['address_list'] : array();
     
    8588                redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'));
    8689        }
     90
     91        // Since viewtopic.php language entries are used in several modes,
     92        // we include the language file here
     93        $user->add_lang('viewtopic');
    8794
    8895        // Output PM_TO box if message composing
     
    311318                        if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !sizeof($address_list) && !$refresh && !$submit && !$preview)
    312319                        {
    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)
    314322                                {
    315323                                        $address_list = array('u' => array($post['author_id'] => 'to'));
     
    317325                                else
    318326                                {
    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
    320328                                        $address_list = rebuild_header(array('to' => $post['to_address']));
    321329
     
    440448
    441449        // 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)
    443451        {
    444452                // We try to include every previously listed member from the TO Header
     
    632640        if ($load && $drafts)
    633641        {
    634                 load_drafts(0, 0, $id);
     642                load_drafts(0, 0, $id, $action, $msg_id);
    635643        }
    636644
     
    747755        if (!sizeof($error) && $preview)
    748756        {
    749                 $user->add_lang('viewtopic');
    750757                $preview_message = $message_parser->format_display($enable_bbcode, $enable_urls, $enable_smilies, false);
    751758
     
    761768                        $parse_sig->bbcode_bitfield = $preview_signature_bitfield;
    762769
    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']);
    764771                        $preview_signature = $parse_sig->message;
    765772                        unset($parse_sig);
     
    805812
    806813        // 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;
    808815
    809816        $message_parser->decode_message($bbcode_uid);
     
    851858                $forward_text[] = $user->lang['FWD_ORIGINAL_MESSAGE'];
    852859                $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));
    854861                $forward_text[] = sprintf($user->lang['FWD_FROM'], $quote_username_text);
    855862                $forward_text[] = sprintf($user->lang['FWD_TO'], implode(', ', $fwd_to_field['to']));
     
    10401047                'SMILIES_STATUS'                => ($smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
    10411048                'URL_STATUS'                    => ($url_status) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
     1049                'MAX_FONT_SIZE'                 => (int) $config['max_post_font_size'],
    10421050                'MINI_POST_IMG'                 => $user->img('icon_post_target', $user->lang['PM']),
    10431051                'ERROR'                                 => (sizeof($error)) ? implode('<br />', $error) : '',
     
    11251133
    11261134        // 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
    11281138        $username_list = request_var('username_list', '', true);
    11291139        if ($username_list)
     
    11391149                global $refresh, $submit, $preview;
    11401150
    1141                 $refresh = $preview = true;
     1151                $refresh = true;
    11421152                $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                }
    11431159        }
    11441160
Note: See TracChangeset for help on using the changeset viewer.