1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-14 19:45:21 +02:00

[ticket/12174] Remove $update_topic_attachments_flag

PHPBB3-12174
This commit is contained in:
Tristan Darricau 2014-05-09 09:48:09 +02:00
parent 93f901d078
commit 27cb84d3d4

View File

@ -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 . '