1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/14168] Add tests for attachment resync class

PHPBB3-14168
This commit is contained in:
Marc Alexander
2015-09-21 16:28:53 +02:00
parent cebc064f4c
commit 583f42a2aa
3 changed files with 158 additions and 1 deletions

View File

@@ -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);