-
Improvement
-
Resolution: Fixed
-
Minor
-
3.1.0-b4
-
None
if ($data['post_visibility'] == ITEM_APPROVED)
|
{
|
$phpbb_content_visibility->remove_post_from_statistic($data, $sql_data);
|
}
|
else if ($data['post_visibility'] == ITEM_UNAPPROVED || $data['post_visibility'] == ITEM_REAPPROVE)
|
{
|
$sql_data[FORUMS_TABLE] = (($sql_data[FORUMS_TABLE]) ? $sql_data[FORUMS_TABLE] . ', ' : '') . 'forum_posts_unapproved = forum_posts_unapproved - 1';
|
$sql_data[TOPICS_TABLE] = (($sql_data[TOPICS_TABLE]) ? $sql_data[TOPICS_TABLE] . ', ' : '') . 'topic_posts_unapproved = topic_posts_unapproved - 1';
|
}
|
else if ($data['post_visibility'] == ITEM_DELETED)
|
{
|
$sql_data[FORUMS_TABLE] = (($sql_data[FORUMS_TABLE]) ? $sql_data[FORUMS_TABLE] . ', ' : '') . 'forum_posts_softdeleted = forum_posts_softdeleted - 1';
|
$sql_data[TOPICS_TABLE] = (($sql_data[TOPICS_TABLE]) ? $sql_data[TOPICS_TABLE] . ', ' : '') . 'topic_posts_softdeleted = topic_posts_softdeleted - 1';
|
}
|
The extra logic should be moved into remove_post_from_statistic( ) too as it just removing post from forum and topic table stats.