phpBB

Code Changes

File: includes/ucp/ucp_pm_compose.php

  Unmodified   Added   Modified   Removed
Line 26Line 26
function compose_pm($id, $mode, $action, $user_folders = array())
{
global $template, $db, $auth, $user, $cache;

function compose_pm($id, $mode, $action, $user_folders = array())
{
global $template, $db, $auth, $user, $cache;

	global $phpbb_root_path, $phpEx, $config;

	global $phpbb_root_path, $phpEx, $config, $language;

	global $request, $phpbb_dispatcher, $phpbb_container;

// Damn php and globals - i know, this is horrible
// Needed for handle_message_list_actions()
global $refresh, $submit, $preview;


	global $request, $phpbb_dispatcher, $phpbb_container;

// Damn php and globals - i know, this is horrible
// Needed for handle_message_list_actions()
global $refresh, $submit, $preview;


 
	if (!function_exists('generate_smilies'))
{

	include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);

	include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);

 
	}

if (!function_exists('display_custom_bbcodes'))
{

	include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

	include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

 
	}

if (!class_exists('parse_message'))
{

	include($phpbb_root_path . 'includes/message_parser.' . $phpEx);

	include($phpbb_root_path . 'includes/message_parser.' . $phpEx);

 
	}


if (!$action)
{


if (!$action)
{

Line 788Line 799
		extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_modify_parse_before', compact($vars)));

// Parse Attachments - before checksum is calculated

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

// Parse Attachments - before checksum is calculated

 
		if ($message_parser->check_attachment_form_token($language, $request, 'ucp_pm_compose'))
{

		$message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true);

		$message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true);

 
		}


if (count($message_parser->warn_msg) && !($remove_u || $remove_g || $add_to || $add_bcc))
{


if (count($message_parser->warn_msg) && !($remove_u || $remove_g || $add_to || $add_bcc))
{

Line 996Line 1010
	if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !$preview && !$refresh)
{
$message_subject = ((!preg_match('/^Re:/', $message_subject)) ? 'Re: ' : '') . censor_text($message_subject);

	if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !$preview && !$refresh)
{
$message_subject = ((!preg_match('/^Re:/', $message_subject)) ? 'Re: ' : '') . censor_text($message_subject);

 

/**
* This event allows you to modify the PM subject of the PM being quoted
*
* @event core.pm_modify_message_subject
* @var string message_subject String with the PM subject already censored.
* @since 3.2.8-RC1
*/
$vars = array('message_subject');
extract($phpbb_dispatcher->trigger_event('core.pm_modify_message_subject', compact($vars)));

	}

if ($action == 'forward' && !$preview && !$refresh && !$submit)

	}

if ($action == 'forward' && !$preview && !$refresh && !$submit)

Line 1195Line 1219
	$controller_helper = $phpbb_container->get('controller.helper');

// Start assigning vars for main posting page ...

	$controller_helper = $phpbb_container->get('controller.helper');

// Start assigning vars for main posting page ...

	$template->assign_vars(array(

	$template_ary = array(

		'L_POST_A'					=> $page_title,
'L_ICON' => $user->lang['PM_ICON'],
'L_MESSAGE_BODY_EXPLAIN' => $user->lang('MESSAGE_BODY_EXPLAIN', (int) $config['max_post_chars']),

		'L_POST_A'					=> $page_title,
'L_ICON' => $user->lang['PM_ICON'],
'L_MESSAGE_BODY_EXPLAIN' => $user->lang('MESSAGE_BODY_EXPLAIN', (int) $config['max_post_chars']),

Line 1240Line 1264
		'S_CLOSE_PROGRESS_WINDOW'	=> isset($_POST['add_file']),
'U_PROGRESS_BAR' => append_sid("{$phpbb_root_path}posting.$phpEx", 'f=0&mode=popup'),
'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_root_path}posting.$phpEx", 'f=0&mode=popup')),

		'S_CLOSE_PROGRESS_WINDOW'	=> isset($_POST['add_file']),
'U_PROGRESS_BAR' => append_sid("{$phpbb_root_path}posting.$phpEx", 'f=0&mode=popup'),
'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_root_path}posting.$phpEx", 'f=0&mode=popup')),

	));













	);

/**
* Modify the default template vars
*
* @event core.ucp_pm_compose_template
* @var array template_ary Template variables
* @since 3.2.6-RC1
*/
$vars = array('template_ary');
extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_template', compact($vars)));

$template->assign_vars($template_ary);


// Build custom bbcodes array
display_custom_bbcodes();


// Build custom bbcodes array
display_custom_bbcodes();