Changeset 702 for trunk/forum/includes/ucp/ucp_pm_viewmessage.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_viewmessage.php
r400 r702 3 3 * 4 4 * @package ucp 5 * @version $Id : ucp_pm_viewmessage.php 9174 2008-12-04 19:58:42Z toonarmy$5 * @version $Id$ 6 6 * @copyright (c) 2005 phpBB Group 7 7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License … … 30 30 $folder_id = (int) $folder_id; 31 31 $author_id = (int) $message_row['author_id']; 32 $view = request_var('view', ''); 32 33 33 34 // Not able to view message, it was deleted by the sender … … 169 170 $url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'); 170 171 172 // Number of "to" recipients 173 $num_recipients = (int) preg_match_all('/:?(u|g)_([0-9]+):?/', $message_row['to_address'], $match); 174 171 175 $template->assign_vars(array( 172 176 'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']), … … 179 183 'AUTHOR_AVATAR' => (isset($user_info['avatar'])) ? $user_info['avatar'] : '', 180 184 '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'], 182 186 'AUTHOR_FROM' => (!empty($user_info['user_from'])) ? $user_info['user_from'] : '', 183 187 … … 190 194 'QUOTE_IMG' => $user->img('icon_post_quote', $user->lang['POST_QUOTE_PM']), 191 195 'REPLY_IMG' => $user->img('button_pm_reply', $user->lang['POST_REPLY_PM']), 196 'REPORT_IMG' => $user->img('icon_post_report', 'REPORT_PM'), 192 197 'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['POST_EDIT_PM']), 193 198 'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['PM']), 194 199 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']), 196 201 'SUBJECT' => $message_row['message_subject'], 197 202 'MESSAGE' => $message, … … 210 215 'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '', 211 216 'U_EMAIL' => $user_info['email'], 217 'U_REPORT' => ($config['allow_pm_report']) ? append_sid("{$phpbb_root_path}report.$phpEx", "pm=" . $message_row['msg_id']) : '', 212 218 'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '', 213 219 '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'] : '', 214 220 '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'] : '', 215 222 'U_PREVIOUS_PM' => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=previous", 216 223 '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'], 217 226 218 227 'S_HAS_ATTACHMENTS' => (sizeof($attachments)) ? true : false, … … 220 229 'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false, 221 230 'S_SPECIAL_FOLDER' => in_array($folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)), 231 'S_PM_RECIPIENTS' => $num_recipients, 222 232 223 233 'U_PRINT_PM' => ($config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=print" : '', … … 287 297 if ($row) 288 298 { 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; 290 300 } 291 301 }
Note:
See TracChangeset
for help on using the changeset viewer.