diff --git a/core/file_api.php b/core/file_api.php index be16a5d94e..a4c0bea8f3 100644 --- a/core/file_api.php +++ b/core/file_api.php @@ -1054,19 +1054,22 @@ function file_copy_attachments( $p_source_bug_id, $p_dest_bug_id ) { } } - $t_query = 'INSERT INTO {bug_file} - ( bug_id, title, description, diskfile, filename, folder, filesize, file_type, date_added, content ) - VALUES ( ' . db_param() . ', - ' . db_param() . ', - ' . db_param() . ', - ' . db_param() . ', - ' . db_param() . ', - ' . db_param() . ', - ' . db_param() . ', - ' . db_param() . ', - ' . db_param() . ', - ' . db_param() . ');'; - db_query( $t_query, array( $p_dest_bug_id, $t_bug_file['title'], $t_bug_file['description'], $t_new_diskfile_name, $t_new_file_name, $t_file_path, $t_bug_file['filesize'], $t_bug_file['file_type'], $t_bug_file['date_added'], $t_bug_file['content'] ) ); + $t_query = 'INSERT INTO {bug_file} ( + bug_id, title, description, diskfile, filename, folder, + filesize, file_type, date_added, user_id, content + ) + VALUES ( ' + . db_param() . ', ' . db_param() . ', ' . db_param() . ', ' + . db_param() . ', ' . db_param() . ', ' . db_param() . ', ' + . db_param() . ', ' . db_param() . ', ' . db_param() . ', ' + . db_param() . ', ' . db_param() . + ')'; + db_query( $t_query, array( + $p_dest_bug_id, $t_bug_file['title'], $t_bug_file['description'], + $t_new_diskfile_name, $t_new_file_name, $t_file_path, + $t_bug_file['filesize'], $t_bug_file['file_type'], $t_bug_file['date_added'], + $t_bug_file['user_id'], $t_bug_file['content'] + ) ); } }