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:
parent
346523fad6
commit
745dd5f5a8
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user