diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 9cb2dabd02..6fc6654f26 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -95,6 +95,20 @@ function decode_text(&$message, $bbcode_uid)
$server_protocol = ($config['cookie_secure']) ? 'https://' : 'http://';
$server_port = ($config['server_port'] <> 80) ? ':' . trim($config['server_port']) . '/' : '/';
+ $search = array(
+ '
',
+ ":u:$bbcode_uid",
+ ":o:$bbcode_uid",
+ ":$bbcode_uid"
+ );
+ $replace = array(
+ "\n",
+ '',
+ '',
+ ''
+ );
+ $message = str_replace($search, $replace, $message);
+
$match = array(
'#.*?#',
'#.*?#',
@@ -103,7 +117,6 @@ function decode_text(&$message, $bbcode_uid)
'#
', "\n", $message);
$message = preg_replace($match, $replace, $message);
return;
@@ -1144,7 +1154,7 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
));
}
- $topic_replies_sql = ($mode == 'reply') ? ', topic_replies = topic_replies + 1, topic_replies_real = topic_replies_real + 1' : '';
+ $topic_replies_sql = ($mode == 'reply' || $mode == 'quote') ? ', topic_replies = topic_replies + 1, topic_replies_real = topic_replies_real + 1' : '';
$sql = 'UPDATE ' . TOPICS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $topic_sql) . $topic_replies_sql . ' WHERE topic_id = ' . $post_data['topic_id'];
$db->sql_query($sql);