1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

Merge branch '3.2.x'

* 3.2.x:
  [ticket/15079] Parse message before inserting it into drafts table
This commit is contained in:
Tristan Darricau
2017-04-18 23:20:05 +02:00

View File

@@ -694,13 +694,16 @@ if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts') && (
{ {
if (confirm_box(true)) if (confirm_box(true))
{ {
$message_parser->message = $message;
$message_parser->parse($post_data['enable_bbcode'], ($config['allow_post_links']) ? $post_data['enable_urls'] : false, $post_data['enable_smilies'], $img_status, $flash_status, $quote_status, $config['allow_post_links']);
$sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array( $sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'user_id' => (int) $user->data['user_id'], 'user_id' => (int) $user->data['user_id'],
'topic_id' => (int) $topic_id, 'topic_id' => (int) $topic_id,
'forum_id' => (int) $forum_id, 'forum_id' => (int) $forum_id,
'save_time' => (int) $current_time, 'save_time' => (int) $current_time,
'draft_subject' => (string) $subject, 'draft_subject' => (string) $subject,
'draft_message' => (string) $message) 'draft_message' => (string) $message_parser->message)
); );
$db->sql_query($sql); $db->sql_query($sql);