diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-10-19 13:55:48 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-10-19 13:55:48 +0000 |
| commit | fcd9b898f156b9b0269a2d2108b9d83660b791d0 (patch) | |
| tree | 9a2b09047c79fa386619f5ecd63306fe2bdf7ef1 /phpBB/includes/functions_posting.php | |
| parent | 9a0ca3d334396940cc32ed153ccdfef76ece8d9e (diff) | |
| download | forums-fcd9b898f156b9b0269a2d2108b9d83660b791d0.tar forums-fcd9b898f156b9b0269a2d2108b9d83660b791d0.tar.gz forums-fcd9b898f156b9b0269a2d2108b9d83660b791d0.tar.bz2 forums-fcd9b898f156b9b0269a2d2108b9d83660b791d0.tar.xz forums-fcd9b898f156b9b0269a2d2108b9d83660b791d0.zip | |
Revised attachment categories a bit
Fixes for the following bugs:
#4830
#4818
#4816
#4810
#4808
#4798
#4796
#4772
#4662
#4646
#4546
#4524
#4270
I hope not having introduced additional severe errors :)
git-svn-id: file:///svn/phpbb/trunk@6511 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
| -rw-r--r-- | phpBB/includes/functions_posting.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 2bdc109b96..fccad678a9 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -111,7 +111,7 @@ function update_post_information($type, $ids, $return_update_sql = false) $ids = array($ids); } - $update_sql = $empty_forums = array(); + $update_sql = $empty_forums = $not_empty_forums = array(); if (sizeof($ids) == 1) { @@ -140,7 +140,12 @@ function update_post_information($type, $ids, $return_update_sql = false) if ($type == 'forum') { - $empty_forums[] = $row['forum_id']; + $not_empty_forums[] = $row['forum_id']; + + if (empty($row['last_post_id'])) + { + $empty_forums[] = $row['forum_id']; + } } $last_post_ids[] = $row['last_post_id']; @@ -149,7 +154,7 @@ function update_post_information($type, $ids, $return_update_sql = false) if ($type == 'forum') { - $empty_forums = array_diff($ids, $empty_forums); + $empty_forums = array_merge($empty_forums, array_diff($ids, $not_empty_forums)); foreach ($empty_forums as $void => $forum_id) { |
