mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 14:28:56 +00:00
[ticket/16500] Fix attachments ordering for copy topic feature
PHPBB3-16500
This commit is contained in:
parent
c66dd87f68
commit
e2ced58517
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