diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2014-10-29 15:10:39 +0100 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2014-10-29 15:10:39 +0100 |
| commit | 17928563a2a265f4b70feef64e5030ea3c602269 (patch) | |
| tree | 02efc9bc621794e490e851a71f07bdad7c1c8d1e /phpBB | |
| parent | bb4f65d74386acbc7940bdebfb7f4082e295843c (diff) | |
| parent | 1787ccb5852e09566ba13040ad3f8ca53052e6dd (diff) | |
| download | forums-17928563a2a265f4b70feef64e5030ea3c602269.tar forums-17928563a2a265f4b70feef64e5030ea3c602269.tar.gz forums-17928563a2a265f4b70feef64e5030ea3c602269.tar.bz2 forums-17928563a2a265f4b70feef64e5030ea3c602269.tar.xz forums-17928563a2a265f4b70feef64e5030ea3c602269.zip | |
Merge pull request #3093 from nickvergessen/ticket/13241
[ticket/13241] Fix pagination of viewforum with global announcements
* nickvergessen/ticket/13241:
[ticket/13241] Remove sleep() and change flood interval instead
[ticket/13241] Remove sleep() since the method takes care of this now
[ticket/13241] Sleep for 1 second when posting twice in the same second
[ticket/13241] Fix pagination with global announcements
[ticket/13241] Correctly ignore announcements from topics list
[ticket/13241] Add a functional test for viewforum with global announcement
Diffstat (limited to 'phpBB')
| -rw-r--r-- | phpBB/viewforum.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 6379da6802..1f455494f7 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -504,8 +504,8 @@ if ($start > $topics_count / 2) // Select the sort order $direction = (($sort_dir == 'd') ? 'ASC' : 'DESC'); - $sql_limit = $pagination->reverse_limit($start, $sql_limit, $topics_count); - $sql_start = $pagination->reverse_start($start, $sql_limit, $topics_count); + $sql_limit = $pagination->reverse_limit($start, $sql_limit, $topics_count - sizeof($announcement_list)); + $sql_start = $pagination->reverse_start($start, $sql_limit, $topics_count - sizeof($announcement_list)); } else { @@ -694,10 +694,10 @@ if ($s_display_active) // We need to remove the global announcements from the forums total topic count, // otherwise the number is different from the one on the forum list -$total_topic_count = $topics_count - sizeof($global_announce_forums); +$total_topic_count = $topics_count - sizeof($announcement_list); $base_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '')); -$pagination->generate_template_pagination($base_url, 'pagination', 'start', $topics_count, $config['topics_per_page'], $start); +$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_topic_count, $config['topics_per_page'], $start); $template->assign_vars(array( 'TOTAL_TOPICS' => ($s_display_active) ? false : $user->lang('VIEW_FORUM_TOPICS', (int) $total_topic_count), |
