mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
Merge remote-tracking branch 'brunoais/ticket/11655' into develop
* brunoais/ticket/11655: [ticket/11653] Use $parse_flags [ticket/11653] Missing ";" [ticket/11655] Use $parse_flags [ticket/11655] wrong var names for the uid and for the bitfield [ticket/11655] generate_text_for_display on ucp_pm_viewmessage.php
This commit is contained in:
commit
498f6ccbfc
1 changed files with 4 additions and 26 deletions
|
@ -76,17 +76,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
$user_info = get_user_information($author_id, $message_row);
|
||||
|
||||
// Parse the message and subject
|
||||
$message = censor_text($message_row['message_text']);
|
||||
|
||||
// Second parse bbcode here
|
||||
if ($message_row['bbcode_bitfield'])
|
||||
{
|
||||
$bbcode->bbcode_second_pass($message, $message_row['bbcode_uid'], $message_row['bbcode_bitfield']);
|
||||
}
|
||||
|
||||
// Always process smilies after parsing bbcodes
|
||||
$message = bbcode_nl2br($message);
|
||||
$message = smiley_text($message);
|
||||
$parse_flags = ($message_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
|
||||
$message = generate_text_for_display($message_row['message_text'], $message_row['bbcode_uid'], $message_row['bbcode_bitfield'], $parse_flags, true);
|
||||
|
||||
// Replace naughty words such as farty pants
|
||||
$message_row['message_subject'] = censor_text($message_row['message_subject']);
|
||||
|
@ -160,21 +151,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
// End signature parsing, only if needed
|
||||
if ($signature)
|
||||
{
|
||||
$signature = censor_text($signature);
|
||||
|
||||
if ($user_info['user_sig_bbcode_bitfield'])
|
||||
{
|
||||
if ($bbcode === false)
|
||||
{
|
||||
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
||||
$bbcode = new bbcode($user_info['user_sig_bbcode_bitfield']);
|
||||
}
|
||||
|
||||
$bbcode->bbcode_second_pass($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield']);
|
||||
}
|
||||
|
||||
$signature = bbcode_nl2br($signature);
|
||||
$signature = smiley_text($signature);
|
||||
$parse_flags = ($user_info['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
|
||||
$signature = generate_text_for_display($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield'], $parse_flags, true);
|
||||
}
|
||||
|
||||
$url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');
|
||||
|
|
Loading…
Add table
Reference in a new issue