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_viewmessage.php

    r400 r702  
    33*
    44* @package ucp
    5 * @version $Id: ucp_pm_viewmessage.php 9174 2008-12-04 19:58:42Z toonarmy $
     5* @version $Id$
    66* @copyright (c) 2005 phpBB Group
    77* @license http://opensource.org/licenses/gpl-license.php GNU Public License
     
    3030        $folder_id      = (int) $folder_id;
    3131        $author_id      = (int) $message_row['author_id'];
     32        $view           = request_var('view', '');
    3233
    3334        // Not able to view message, it was deleted by the sender
     
    169170        $url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');
    170171
     172        // Number of "to" recipients
     173        $num_recipients = (int) preg_match_all('/:?(u|g)_([0-9]+):?/', $message_row['to_address'], $match);
     174
    171175        $template->assign_vars(array(
    172176                'MESSAGE_AUTHOR_FULL'           => get_username_string('full', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
     
    179183                'AUTHOR_AVATAR'         => (isset($user_info['avatar'])) ? $user_info['avatar'] : '',
    180184                'AUTHOR_JOINED'         => $user->format_date($user_info['user_regdate']),
    181                 'AUTHOR_POSTS'          => (!empty($user_info['user_posts'])) ? $user_info['user_posts'] : '',
     185                'AUTHOR_POSTS'          => (int) $user_info['user_posts'],
    182186                'AUTHOR_FROM'           => (!empty($user_info['user_from'])) ? $user_info['user_from'] : '',
    183187
     
    190194                'QUOTE_IMG'                     => $user->img('icon_post_quote', $user->lang['POST_QUOTE_PM']),
    191195                'REPLY_IMG'                     => $user->img('button_pm_reply', $user->lang['POST_REPLY_PM']),
     196                'REPORT_IMG'            => $user->img('icon_post_report', 'REPORT_PM'),
    192197                'EDIT_IMG'                      => $user->img('icon_post_edit', $user->lang['POST_EDIT_PM']),
    193198                'MINI_POST_IMG'         => $user->img('icon_post_target', $user->lang['PM']),
    194199
    195                 'SENT_DATE'                     => $user->format_date($message_row['message_time']),
     200                'SENT_DATE'                     => ($view == 'print') ? $user->format_date($message_row['message_time'], false, true) : $user->format_date($message_row['message_time']),
    196201                'SUBJECT'                       => $message_row['message_subject'],
    197202                'MESSAGE'                       => $message,
     
    210215                'U_DELETE'                      => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '',
    211216                'U_EMAIL'                       => $user_info['email'],
     217                'U_REPORT'                      => ($config['allow_pm_report']) ? append_sid("{$phpbb_root_path}report.$phpEx", "pm=" . $message_row['msg_id']) : '',
    212218                'U_QUOTE'                       => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '',
    213219                '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&mode=compose&action=edit&f=$folder_id&p=" . $message_row['msg_id'] : '',
    214220                'U_POST_REPLY_PM'       => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $message_row['msg_id'] : '',
     221                'U_POST_REPLY_ALL'      => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=reply&f=$folder_id&reply_to_all=1&p=" . $message_row['msg_id'] : '',
    215222                'U_PREVIOUS_PM'         => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=previous",
    216223                'U_NEXT_PM'                     => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=next",
     224
     225                'U_PM_ACTION'           => $url . '&mode=compose&f=' . $folder_id . '&p=' . $message_row['msg_id'],
    217226
    218227                'S_HAS_ATTACHMENTS'     => (sizeof($attachments)) ? true : false,
     
    220229                'S_AUTHOR_DELETED'      => ($author_id == ANONYMOUS) ? true : false,
    221230                'S_SPECIAL_FOLDER'      => in_array($folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)),
     231                'S_PM_RECIPIENTS'       => $num_recipients,
    222232
    223233                'U_PRINT_PM'            => ($config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=print" : '',
     
    287297                if ($row)
    288298                {
    289                         $user_row['online'] = (time() - $update_time < $row['online_time'] && ($row['viewonline'])) ? true : false;
     299                        $user_row['online'] = (time() - $update_time < $row['online_time'] && ($row['viewonline'] || $auth->acl_get('u_viewonline'))) ? true : false;
    290300                }
    291301        }
Note: See TracChangeset for help on using the changeset viewer.