mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00: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:
parent
04899d1efd
commit
12fdfe145a
1 changed files with 20 additions and 1 deletions
|
@ -978,7 +978,26 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||||
censor_text($message_parser->message),
|
censor_text($message_parser->message),
|
||||||
$quote_attributes
|
$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)
|
if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !$preview && !$refresh)
|
||||||
|
|
Loading…
Add table
Reference in a new issue