aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 913962f566..5efaecb503 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -977,9 +977,10 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = FALSE,
}
}
- $sql = 'SELECT DISTINCT(post_id)
+ $sql = 'SELECT DISTINCT(post_msg_id)
FROM ' . ATTACHMENTS_TABLE . '
- WHERE post_id IN (' . implode(', ', $post_ids) . ')';
+ WHERE post_msg_id IN (' . implode(', ', $post_ids) . ')
+ AND in_message = 0';
$post_ids = array();
$result = $db->sql_query($sql);