mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/15622] Fix quoting in PMs when BBCodes are disabled
Before parsing the private message to be loaded a simple BBCode status check is done to verify that BBCodes are enabled. Depending on that option the quote will be formated as BBCode or as plain text, similarly to what is done in posting.php. PHPBB3-15622
This commit is contained in:
@@ -978,7 +978,26 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
censor_text($message_parser->message),
|
||||
$quote_attributes
|
||||
);
|
||||
$message_parser->message = $message_link . $quote_text . "\n\n";
|
||||
if ($bbcode_status)
|
||||
{
|
||||
$message_parser->message = $message_link . $quote_text . "\n\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$offset = 0;
|
||||
$quote_string = "> ";
|
||||
$message = censor_text(trim($message_parser->message));
|
||||
// see if we are nesting. It's easily tricked but should work for one level of nesting
|
||||
if (strpos($message, ">") !== false)
|
||||
{
|
||||
$offset = 10;
|
||||
}
|
||||
$message = utf8_wordwrap($message, 75 + $offset, "\n");
|
||||
|
||||
$message = $quote_string . $message;
|
||||
$message = str_replace("\n", "\n" . $quote_string, $message);
|
||||
$message_parser->message = $quote_username . " " . $user->lang['WROTE'] . ":\n" . $message . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !$preview && !$refresh)
|
||||
|
Reference in New Issue
Block a user