diff options
author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-05-29 15:42:14 +0200 |
---|---|---|
committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-05-29 15:42:14 +0200 |
commit | f5dbc3b6f269cb3841c20ad0096fcedb3dac7492 (patch) | |
tree | 5ca32d171af32f236d82cbf11cedfe3735c5fa3d /phpBB/includes | |
parent | 3c3b099f88471e05358fe3c01bb74caac69e89e7 (diff) | |
parent | 64e1824abdb2a9c860e049f10ecc81c051160ff5 (diff) | |
download | forums-f5dbc3b6f269cb3841c20ad0096fcedb3dac7492.tar forums-f5dbc3b6f269cb3841c20ad0096fcedb3dac7492.tar.gz forums-f5dbc3b6f269cb3841c20ad0096fcedb3dac7492.tar.bz2 forums-f5dbc3b6f269cb3841c20ad0096fcedb3dac7492.tar.xz forums-f5dbc3b6f269cb3841c20ad0096fcedb3dac7492.zip |
Merge pull request #3616 from s9e/ticket/13847
[ticket/13847] Move quote generation to text_formatter.utils
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_compose.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 59952182df..53be1b3b29 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -947,7 +947,11 @@ function compose_pm($id, $mode, $action, $user_folders = array()) { $message_link = ''; } - $message_parser->message = $message_link . '[quote="' . $quote_username . '"]' . censor_text(trim($message_parser->message)) . "[/quote]\n"; + $quote_text = $phpbb_container->get('text_formatter.utils')->generate_quote( + censor_text(trim($message_parser->message)), + array('author' => $quote_username) + ); + $message_parser->message = $message_link . $quote_text . "\n"; } if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !$preview && !$refresh) @@ -975,7 +979,11 @@ function compose_pm($id, $mode, $action, $user_folders = array()) $forward_text[] = sprintf($user->lang['FWD_FROM'], $quote_username_text); $forward_text[] = sprintf($user->lang['FWD_TO'], implode($user->lang['COMMA_SEPARATOR'], $fwd_to_field['to'])); - $message_parser->message = implode("\n", $forward_text) . "\n\n[quote="{$quote_username}"]\n" . censor_text(trim($message_parser->message)) . "\n[/quote]"; + $quote_text = $phpbb_container->get('text_formatter.utils')->generate_quote( + censor_text(trim($message_parser->message)), + array('author' => $quote_username) + ); + $message_parser->message = implode("\n", $forward_text) . "\n\n" . $quote_text; $message_subject = ((!preg_match('/^Fwd:/', $message_subject)) ? 'Fwd: ' : '') . censor_text($message_subject); } |