diff options
author | Marc Alexander <admin@m-a-styles.de> | 2015-09-21 16:28:53 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-10-09 10:15:40 +0200 |
commit | 583f42a2aa5ba8132e9e516b363ba0180fe46289 (patch) | |
tree | 612edf77aeda98158f091549c7ec1df750853b16 /phpBB/phpbb | |
parent | cebc064f4c15b9c53210cc3729756b4d7888041b (diff) | |
download | forums-583f42a2aa5ba8132e9e516b363ba0180fe46289.tar forums-583f42a2aa5ba8132e9e516b363ba0180fe46289.tar.gz forums-583f42a2aa5ba8132e9e516b363ba0180fe46289.tar.bz2 forums-583f42a2aa5ba8132e9e516b363ba0180fe46289.tar.xz forums-583f42a2aa5ba8132e9e516b363ba0180fe46289.zip |
[ticket/14168] Add tests for attachment resync class
PHPBB3-14168
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/attachment/resync.php | 4 |
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); |