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:
parent
93f901d078
commit
27cb84d3d4
@ -437,7 +437,6 @@ class content_visibility
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$update_topic_attachments_flag = false;
|
|
||||||
if ($post_id)
|
if ($post_id)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT 1 as has_attachments
|
$sql = 'SELECT 1 as has_attachments
|
||||||
@ -453,17 +452,15 @@ class content_visibility
|
|||||||
|
|
||||||
if ($has_attachment && $visibility == ITEM_APPROVED)
|
if ($has_attachment && $visibility == ITEM_APPROVED)
|
||||||
{
|
{
|
||||||
$update_topic_attachments_flag = true;
|
|
||||||
$topic_update_array[] = 'topic_attachment = 1';
|
$topic_update_array[] = 'topic_attachment = 1';
|
||||||
}
|
}
|
||||||
else if (!$has_attachment && $visibility != ITEM_APPROVED)
|
else if (!$has_attachment && $visibility != ITEM_APPROVED)
|
||||||
{
|
{
|
||||||
$update_topic_attachments_flag = true;
|
|
||||||
$topic_update_array[] = 'topic_attachment = 0';
|
$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
|
// Update the number for replies and posts, and update the attachments flag
|
||||||
$sql = 'UPDATE ' . $this->topics_table . '
|
$sql = 'UPDATE ' . $this->topics_table . '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user