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 49Line 50
	{
trigger_error('NO_AUTH_READ_HOLD_MESSAGE');
}

	{
trigger_error('NO_AUTH_READ_HOLD_MESSAGE');
}


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

 

// 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 231Line 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 265Line 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 276Line 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 353Line 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)