aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-04-11 14:10:58 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-04-25 11:52:22 +0200
commit2ec9c08a2bce2cb83c68339d2d07039cabc44d68 (patch)
tree17e48c56e526046f0e1d34f157e3791e67be435a /phpBB/includes/functions_admin.php
parentdac01e8ca534b4d145d99e49a6aee173b85925f5 (diff)
downloadforums-2ec9c08a2bce2cb83c68339d2d07039cabc44d68.tar
forums-2ec9c08a2bce2cb83c68339d2d07039cabc44d68.tar.gz
forums-2ec9c08a2bce2cb83c68339d2d07039cabc44d68.tar.bz2
forums-2ec9c08a2bce2cb83c68339d2d07039cabc44d68.tar.xz
forums-2ec9c08a2bce2cb83c68339d2d07039cabc44d68.zip
[ticket/12052] Use different visibility when post was edited
... and needs to be reapproved. PHPBB3-12052
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 01cba10b40..fdf40c8564 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -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'];