1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-01 12:05:37 +02:00

[ticket/17113] Usq sql_build_array() for cleaner code

PHPBB3-17113
This commit is contained in:
Marc Alexander 2023-09-27 22:03:17 +02:00
parent 346523fad6
commit 745dd5f5a8
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -639,9 +639,12 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
));
// Change topic title of first post and write icon_id to post
$sql = 'UPDATE ' . POSTS_TABLE . "
SET post_subject = '" . $db->sql_escape($subject) . "',
icon_id = '" . $icon_id . "'
$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);