1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-24 18:41:52 +02:00

Merge pull request #6547 from Crizz0/ticket/17113

[ticket/17113] Write icon_id to split topic's posts
This commit is contained in:
Marc Alexander
2023-09-30 17:07:03 +02:00

View File

@@ -638,9 +638,13 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
$topic_info['topic_title']
));
// Change topic title of first post
$sql = 'UPDATE ' . POSTS_TABLE . "
SET post_subject = '" . $db->sql_escape($subject) . "'
// Change topic title of first post and write icon_id to post
$sql_ary = [
'post_subject' => $subject,
'icon_id' => $icon_id,
];
$sql = 'UPDATE ' . POSTS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
WHERE post_id = {$post_id_list[0]}";
$db->sql_query($sql);