aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/attachment/resync.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/attachment/resync.php')
-rw-r--r--phpBB/phpbb/attachment/resync.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/phpbb/attachment/resync.php b/phpBB/phpbb/attachment/resync.php
index 9abf961c6b..adb642fe97 100644
--- a/phpBB/phpbb/attachment/resync.php
+++ b/phpBB/phpbb/attachment/resync.php
@@ -93,6 +93,8 @@ class resync
return;
}
+ $this->set_type_constraints($type);
+
// Just check which elements are still having an assigned attachment
// not orphaned by querying the attachments table
$sql = 'SELECT ' . $this->attach_sql_id . '
@@ -113,7 +115,7 @@ class resync
if (sizeof($ids))
{
- $sql = 'UPDATE ' . POSTS_TABLE . '
+ $sql = 'UPDATE ' . $this->resync_table . '
SET ' . $type . '_attachment = 0
WHERE ' . $this->db->sql_in_set($this->resync_sql_id, $ids);
$this->db->sql_query($sql);