diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/viewforum.php | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 8913c7148d..b691f19015 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -93,6 +93,7 @@ <li>[Fix] Let newly activated passwords work if users were converted (Bug #14787)</li> <li>[Fix] Quote bbcode fixes. Letting parse quote="[" and re-allowing whitelisted bbcodes within username portion (Bug #14770)</li> <li>[Sec] Fix bbcode helpline display for custom bbcodes - this requires style changes for any custom style (Bug #14850)</li> + <li>[Fix] Correctly count announcements when filtering forums by date (Bug #14877)</li> </ul> <a name="v30rc6"></a><h3>1.ii. Changes since 3.0.RC6</h3> diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index cb4e44f569..8621ba8ab8 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -211,6 +211,8 @@ $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); // Limit topics to certain time frame, obtain correct topic count +// global announcements must not be counted, normal announcements have to +// be counted, as forum_topics(_real) includes them if ($sort_days) { $min_post_time = time() - ($sort_days * 86400); @@ -218,8 +220,8 @@ if ($sort_days) $sql = 'SELECT COUNT(topic_id) AS num_topics FROM ' . TOPICS_TABLE . " WHERE forum_id = $forum_id - AND topic_type NOT IN (" . POST_ANNOUNCE . ', ' . POST_GLOBAL . ") - AND topic_last_post_time >= $min_post_time + AND ((topic_type <> " . POST_GLOBAL . " AND topic_last_post_time >= $min_post_time) + OR topic_type = " . POST_ANNOUNCE . ") " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND topic_approved = 1'); $result = $db->sql_query($sql); $topics_count = (int) $db->sql_fetchfield('num_topics'); |