mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-27 20:10:18 +02:00
[ticket/12052] Use different visibility when post was edited
... and needs to be reapproved. PHPBB3-12052
This commit is contained in:
@@ -1487,7 +1487,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
ITEM_DELETED => (!empty($topics_softdeleted)) ? ' WHERE ' . $db->sql_in_set('topic_id', $topics_softdeleted) : '',
|
||||
);
|
||||
|
||||
foreach ($topic_visiblities as $visibility => $sql_where)
|
||||
foreach ($update_ary as $visibility => $sql_where)
|
||||
{
|
||||
if ($sql_where)
|
||||
{
|
||||
@@ -1776,7 +1776,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
{
|
||||
$forum_data[$forum_id]['topics_approved'] = $row['total_topics'];
|
||||
}
|
||||
else if ($row['topic_visibility'] == ITEM_UNAPPROVED)
|
||||
else if ($row['topic_visibility'] == ITEM_UNAPPROVED || $row['topic_visibility'] == ITEM_REAPPROVE)
|
||||
{
|
||||
$forum_data[$forum_id]['topics_unapproved'] = $row['total_topics'];
|
||||
}
|
||||
@@ -1999,7 +1999,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
{
|
||||
$topic_data[$topic_id]['posts_approved'] = $row['total_posts'];
|
||||
}
|
||||
else if ($row['post_visibility'] == ITEM_UNAPPROVED)
|
||||
else if ($row['post_visibility'] == ITEM_UNAPPROVED || $row['post_visibility'] == ITEM_REAPPROVE)
|
||||
{
|
||||
$topic_data[$topic_id]['posts_unapproved'] = $row['total_posts'];
|
||||
}
|
||||
@@ -2021,7 +2021,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$topic_data[$topic_id]['first_post_id'] = (!empty($topic_data[$topic_id]['first_post_id'])) ? min($topic_data[$topic_id]['first_post_id'], $row['first_post_id']) : $row['first_post_id'];
|
||||
$topic_data[$topic_id]['last_post_id'] = max($topic_data[$topic_id]['last_post_id'], $row['last_post_id']);
|
||||
|
||||
if ($topic_data[$topic_id]['visibility'] == ITEM_UNAPPROVED)
|
||||
if ($topic_data[$topic_id]['visibility'] == ITEM_UNAPPROVED || $topic_data[$topic_id]['visibility'] == ITEM_REAPPROVE)
|
||||
{
|
||||
// Soft delete status is stronger than unapproved.
|
||||
$topic_data[$topic_id]['visibility'] = $row['post_visibility'];
|
||||
|
Reference in New Issue
Block a user