phpBB

Code Changes

File: includes/ucp/ucp_pm_viewmessage.php

  Unmodified   Added   Modified   Removed
Line 24Line 24
*/
function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
{

*/
function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
{

	global $user, $template, $auth, $db, $cache, $phpbb_container;

	global $user, $template, $auth, $db, $phpbb_container;

	global $phpbb_root_path, $request, $phpEx, $config, $phpbb_dispatcher;

$user->add_lang(array('viewtopic', 'memberlist'));

	global $phpbb_root_path, $request, $phpEx, $config, $phpbb_dispatcher;

$user->add_lang(array('viewtopic', 'memberlist'));

Line 32Line 32
	$msg_id		= (int) $msg_id;
$folder_id = (int) $folder_id;
$author_id = (int) $message_row['author_id'];

	$msg_id		= (int) $msg_id;
$folder_id = (int) $folder_id;
$author_id = (int) $message_row['author_id'];

	$view		= request_var('view', '');

	$view		= $request->variable('view', '');


// Not able to view message, it was deleted by the sender
if ($message_row['pm_deleted'])


// Not able to view message, it was deleted by the sender
if ($message_row['pm_deleted'])

Line 41Line 41
		$message = $user->lang['NO_AUTH_READ_REMOVED_MESSAGE'];

$message .= '<br /><br />' . sprintf($user->lang['RETURN_FOLDER'], '<a href="' . $meta_info . '">', '</a>');

		$message = $user->lang['NO_AUTH_READ_REMOVED_MESSAGE'];

$message .= '<br /><br />' . sprintf($user->lang['RETURN_FOLDER'], '<a href="' . $meta_info . '">', '</a>');

 
		send_status_line(403, 'Forbidden');

		trigger_error($message);
}


		trigger_error($message);
}


Line 48Line 49
	if ($folder_id == PRIVMSGS_HOLD_BOX)
{
trigger_error('NO_AUTH_READ_HOLD_MESSAGE');

	if ($folder_id == PRIVMSGS_HOLD_BOX)
{
trigger_error('NO_AUTH_READ_HOLD_MESSAGE');

	}

// Grab icons
$icons = $cache->obtain_icons();

$bbcode = false;

// Instantiate BBCode if need be
if ($message_row['bbcode_bitfield'])
{
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
$bbcode = new bbcode($message_row['bbcode_bitfield']);

 
	}

// Load the custom profile fields
if ($config['load_cpf_pm'])
{

	}

// Load the custom profile fields
if ($config['load_cpf_pm'])
{

 
		/* @var $cp \phpbb\profilefields\manager */

		$cp = $phpbb_container->get('profilefields.manager');

$profile_fields = $cp->grab_profile_fields_data($author_id);

		$cp = $phpbb_container->get('profilefields.manager');

$profile_fields = $cp->grab_profile_fields_data($author_id);

Line 197Line 187
		$u_pm = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $author_id);
}


		$u_pm = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $author_id);
}


	if ($user_info['user_jabber'] && $auth->acl_get('u_sendim'))

	if ($config['jab_enable'] && $user_info['user_jabber'] && $auth->acl_get('u_sendim'))

	{
$u_jabber = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=jabber&amp;u=' . $author_id);
}

	{
$u_jabber = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=jabber&amp;u=' . $author_id);
}

Line 213Line 203
		'AUTHOR_AVATAR'		=> (isset($user_info['avatar'])) ? $user_info['avatar'] : '',
'AUTHOR_JOINED' => $user->format_date($user_info['user_regdate']),
'AUTHOR_POSTS' => (int) $user_info['user_posts'],

		'AUTHOR_AVATAR'		=> (isset($user_info['avatar'])) ? $user_info['avatar'] : '',
'AUTHOR_JOINED' => $user->format_date($user_info['user_regdate']),
'AUTHOR_POSTS' => (int) $user_info['user_posts'],

 
		'U_AUTHOR_POSTS'	=> ($config['load_search'] && $auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$author_id&amp;sr=posts") : '',

		'CONTACT_USER'		=> $user->lang('CONTACT_USER', get_username_string('username', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username'])),

'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : ((isset($user_info['online']) && $user_info['online']) ? $user->img('icon_user_online', $user->lang['ONLINE']) : $user->img('icon_user_offline', $user->lang['OFFLINE'])),

		'CONTACT_USER'		=> $user->lang('CONTACT_USER', get_username_string('username', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username'])),

'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : ((isset($user_info['online']) && $user_info['online']) ? $user->img('icon_user_online', $user->lang['ONLINE']) : $user->img('icon_user_offline', $user->lang['OFFLINE'])),

Line 239Line 230

'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&amp;mode=compose&amp;action=delete&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_EMAIL' => $user_info['email'],


'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&amp;mode=compose&amp;action=delete&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_EMAIL' => $user_info['email'],

		'U_REPORT'			=> ($config['allow_pm_report']) ? append_sid("{$phpbb_root_path}report.$phpEx", "pm=" . $message_row['msg_id']) : '',

		'U_REPORT'			=> ($config['allow_pm_report']) ? $phpbb_container->get('controller.helper')->route('phpbb_report_pm_controller', array('id' => $message_row['msg_id'])) : '',

		'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_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'] : '',

Line 273Line 264
	* @var	array	message_row	Array with message data
* @var array cp_row Array with senders custom profile field data
* @var array msg_data Template array with message data

	* @var	array	message_row	Array with message data
* @var array cp_row Array with senders custom profile field data
* @var array msg_data Template array with message data

 
	* @var 	array	user_info	User data of the sender

	* @since 3.1.0-a1

	* @since 3.1.0-a1

 
	* @changed 3.1.6-RC1		Added user_info into event

	*/
$vars = array(
'id',

	*/
$vars = array(
'id',

Line 284Line 277
		'message_row',
'cp_row',
'msg_data',

		'message_row',
'cp_row',
'msg_data',

 
		'user_info',

	);
extract($phpbb_dispatcher->trigger_event('core.ucp_pm_view_messsage', compact($vars)));


	);
extract($phpbb_dispatcher->trigger_event('core.ucp_pm_view_messsage', compact($vars)));


Line 361Line 355
*/
function get_user_information($user_id, $user_row)
{

*/
function get_user_information($user_id, $user_row)
{

	global $db, $auth, $user, $cache;

	global $db, $auth, $user;

	global $phpbb_root_path, $phpEx, $config;

if (!$user_id)

	global $phpbb_root_path, $phpEx, $config;

if (!$user_id)