mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge pull request #5994 from rxu/ticket/16500
[ticket/16500] Fix attachments ordering for copy topic feature
This commit is contained in:
commit
fa13f06e64
1 changed files with 5 additions and 4 deletions
|
@ -1566,10 +1566,11 @@ function mcp_fork_topic($topic_ids)
|
||||||
// Copy Attachments
|
// Copy Attachments
|
||||||
if ($row['post_attachment'])
|
if ($row['post_attachment'])
|
||||||
{
|
{
|
||||||
$sql = 'SELECT * FROM ' . ATTACHMENTS_TABLE . "
|
$sql = 'SELECT * FROM ' . ATTACHMENTS_TABLE . '
|
||||||
WHERE post_msg_id = {$row['post_id']}
|
WHERE post_msg_id = ' . (int) $row['post_id'] . '
|
||||||
AND topic_id = $topic_id
|
AND topic_id = ' . (int) $topic_id . '
|
||||||
AND in_message = 0";
|
AND in_message = 0
|
||||||
|
ORDER BY attach_id ASC';
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$sql_ary = array();
|
$sql_ary = array();
|
||||||
|
|
Loading…
Add table
Reference in a new issue