aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
author3Di <three3di@hotmail.it>2018-10-26 18:33:30 +0200
committerGitHub <noreply@github.com>2018-10-26 18:33:30 +0200
commit379900b4eda527d91c2e3252db5e3b89038bc425 (patch)
tree6c8db1854d475b2b15c1b5c98c77e5f9f9fa1ff3 /phpBB/posting.php
parent001f32da95d4f8697ccc9a6107afc8dc68cbe48e (diff)
parentfd95355c6129043e09d189c193ff5d1abde8db96 (diff)
downloadforums-379900b4eda527d91c2e3252db5e3b89038bc425.tar
forums-379900b4eda527d91c2e3252db5e3b89038bc425.tar.gz
forums-379900b4eda527d91c2e3252db5e3b89038bc425.tar.bz2
forums-379900b4eda527d91c2e3252db5e3b89038bc425.tar.xz
forums-379900b4eda527d91c2e3252db5e3b89038bc425.zip
Merge pull request #2 from phpbb/3.2.x
3.2.x
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php35
1 files changed, 7 insertions, 28 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index d97a22209f..8d40652574 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -1627,35 +1627,14 @@ if ($generate_quote)
// Remove attachment bbcode tags from the quoted message to avoid mixing with the new post attachments if any
$message_parser->message = preg_replace('#\[attachment=([0-9]+)\](.*?)\[\/attachment\]#uis', '\\2', $message_parser->message);
- if ($config['allow_bbcode'])
- {
- $message_parser->message = $bbcode_utils->generate_quote(
- censor_text($message_parser->message),
- array(
- 'author' => $post_data['quote_username'],
- 'post_id' => $post_data['post_id'],
- 'time' => $post_data['post_time'],
- 'user_id' => $post_data['poster_id'],
- )
- );
- $message_parser->message .= "\n\n";
- }
- else
- {
- $offset = 0;
- $quote_string = "&gt; ";
- $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, "&gt;") !== false)
- {
- $offset = 10;
- }
- $message = utf8_wordwrap($message, 75 + $offset, "\n");
+ $quote_attributes = array(
+ 'author' => $post_data['quote_username'],
+ 'post_id' => $post_data['post_id'],
+ 'time' => $post_data['post_time'],
+ 'user_id' => $post_data['poster_id'],
+ );
- $message = $quote_string . $message;
- $message = str_replace("\n", "\n" . $quote_string, $message);
- $message_parser->message = $post_data['quote_username'] . " " . $user->lang['WROTE'] . ":\n" . $message . "\n";
- }
+ phpbb_format_quote($config['allow_bbcode'], $quote_attributes, $bbcode_utils, $message_parser);
}
if (($mode == 'reply' || $mode == 'quote') && !$submit && !$preview && !$refresh)