diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-05-09 09:48:09 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-05-09 09:48:09 +0200 |
commit | 27cb84d3d483ecac19ba51be17d97306ae436ba8 (patch) | |
tree | 7d15280e79e536271ca3dc7ff7645e8f9f69a193 /phpBB/phpbb/content_visibility.php | |
parent | 93f901d078a706368925e50b60d9b086d7ce01e3 (diff) | |
download | forums-27cb84d3d483ecac19ba51be17d97306ae436ba8.tar forums-27cb84d3d483ecac19ba51be17d97306ae436ba8.tar.gz forums-27cb84d3d483ecac19ba51be17d97306ae436ba8.tar.bz2 forums-27cb84d3d483ecac19ba51be17d97306ae436ba8.tar.xz forums-27cb84d3d483ecac19ba51be17d97306ae436ba8.zip |
[ticket/12174] Remove $update_topic_attachments_flag
PHPBB3-12174
Diffstat (limited to 'phpBB/phpbb/content_visibility.php')
-rw-r--r-- | phpBB/phpbb/content_visibility.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 42bf8cf44b..bced0a3247 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -437,7 +437,6 @@ class content_visibility } } - $update_topic_attachments_flag = false; if ($post_id) { $sql = 'SELECT 1 as has_attachments @@ -453,17 +452,15 @@ class content_visibility if ($has_attachment && $visibility == ITEM_APPROVED) { - $update_topic_attachments_flag = true; $topic_update_array[] = 'topic_attachment = 1'; } else if (!$has_attachment && $visibility != ITEM_APPROVED) { - $update_topic_attachments_flag = true; $topic_update_array[] = 'topic_attachment = 0'; } } - if ($update_topic_postcount || $update_topic_attachments_flag) + if (!empty($topic_update_array)) { // Update the number for replies and posts, and update the attachments flag $sql = 'UPDATE ' . $this->topics_table . ' |