diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2012-10-02 15:34:18 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2012-10-02 15:34:18 +0200 |
commit | 5b64ebc11d10b66212661282a4dcfd411d038211 (patch) | |
tree | 151e53ef087f888fcbf953624077b69e9654c013 /phpBB/includes/functions_admin.php | |
parent | 1f8f07b9988b6c4aa83b517cfba6ff73a30e3ea3 (diff) | |
download | forums-5b64ebc11d10b66212661282a4dcfd411d038211.tar forums-5b64ebc11d10b66212661282a4dcfd411d038211.tar.gz forums-5b64ebc11d10b66212661282a4dcfd411d038211.tar.bz2 forums-5b64ebc11d10b66212661282a4dcfd411d038211.tar.xz forums-5b64ebc11d10b66212661282a4dcfd411d038211.zip |
[feature/soft-delete] Fix a bug in sync() and set_post_visibility()
PHPBB3-9657
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r-- | phpBB/includes/functions_admin.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 54130df935..bb8b02bbea 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -1908,12 +1908,12 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, unset($delete_topics[$topic_id]); $topic_data[$topic_id]['replies_real'] += $row['total_posts']; - $topic_data[$topic_id]['first_post_id'] = (!$topic_data[$topic_id]['first_post_id']) ? $row['first_post_id'] : min($topic_data[$topic_id]['first_post_id'], $row['first_post_id']); - if ($row['post_visibility'] || !$topic_data[$topic_id]['last_post_id']) + if ($row['post_visibility'] == ITEM_APPROVED) { - $topic_data[$topic_id]['replies'] = $row['total_posts'] - 1; + $topic_data[$topic_id]['first_post_id'] = $row['first_post_id']; $topic_data[$topic_id]['last_post_id'] = $row['last_post_id']; + $topic_data[$topic_id]['replies'] = $row['total_posts'] - 1; } } } |