From 27cb84d3d483ecac19ba51be17d97306ae436ba8 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Fri, 9 May 2014 09:48:09 +0200 Subject: [PATCH] [ticket/12174] Remove $update_topic_attachments_flag PHPBB3-12174 --- phpBB/phpbb/content_visibility.php | 5 +---- 1 file changed, 1 insertion(+), 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 . '