diff options
author | Igor Wiedler <igor@wiedler.ch> | 2012-07-21 15:36:25 +0200 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2012-07-21 15:36:25 +0200 |
commit | 5d57caee58c58d2a9c283abe8fe88f4eaec9f662 (patch) | |
tree | cd36469a74bf6847e5305d1fb8f4ac35266813e2 /phpBB/viewforum.php | |
parent | 3ebe89cb7eff57c3ffdbe0b7dcd9cdc35b48d26b (diff) | |
parent | 841ea0e494504400c798faa6cc860dd1179e1004 (diff) | |
download | forums-5d57caee58c58d2a9c283abe8fe88f4eaec9f662.tar forums-5d57caee58c58d2a9c283abe8fe88f4eaec9f662.tar.gz forums-5d57caee58c58d2a9c283abe8fe88f4eaec9f662.tar.bz2 forums-5d57caee58c58d2a9c283abe8fe88f4eaec9f662.tar.xz forums-5d57caee58c58d2a9c283abe8fe88f4eaec9f662.zip |
Merge branch 'develop' into feature/dic
* develop: (441 commits)
[feature/new-tz-handling] Don't use global user but make it a parameter
[feature/new-tz-handling] Fix size of suggestion button in chrome
[feature/new-tz-handling] Fall back to UTC, if the timezone is invalid
[feature/new-tz-handling] Add previous selected value to validation if valid
[feature/new-tz-handling] Display suggestion when a different value is selected
[ticket/10998] Add border-radius to forum rules block - prosilver
[feature/new-tz-handling] Remove additional marking of selected items
[feature/new-tz-handling] Move update helper function to new class
[feature/new-tz-handling] Fix unit test
[feature/new-tz-handling] Delete old variable which is not used anymore
[feature/new-tz-handling] Rename $user->tz back to $user->timezone
[feature/pagination-as-list] New parameter for name of start var
[feature/pagination-as-list] Updates for nils comments
[feature/pagination-as-list] Rename and deprecate functions
[feature/pagination-as-list] Various fixes and improvements
[ticket/10968] Render pagination within the template
[feature/new-tz-handling] Remove "timezone might be numeric"
[feature/new-tz-handling] Add function to update the timezone
[feature/new-tz-handling] Correctly update user and board timezones on update
[ticket/10996] Use correct DBMS name in Travis config for PostgreSQL
...
Conflicts:
phpBB/common.php
phpBB/composer.json
phpBB/composer.lock
tests/cron/task_provider_test.php
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r-- | phpBB/viewforum.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 76d5c8ccff..22dc00716a 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -208,7 +208,9 @@ if (!$config['use_system_cron']) // Forum rules and subscription info $s_watching_forum = array( 'link' => '', + 'link_toggle' => '', 'title' => '', + 'title_toggle' => '', 'is_watching' => false, ); @@ -322,8 +324,10 @@ $template->assign_vars(array( 'S_SELECT_SORT_KEY' => $s_sort_key, 'S_SELECT_SORT_DAYS' => $s_limit_days, 'S_TOPIC_ICONS' => ($s_display_active && sizeof($active_forum_ary)) ? max($active_forum_ary['enable_icons']) : (($forum_data['enable_icons']) ? true : false), - 'S_WATCH_FORUM_LINK' => $s_watching_forum['link'], + 'U_WATCH_FORUM_LINK' => $s_watching_forum['link'], + 'U_WATCH_FORUM_TOGGLE' => $s_watching_forum['link_toggle'], 'S_WATCH_FORUM_TITLE' => $s_watching_forum['title'], + 'S_WATCH_FORUM_TOGGLE' => $s_watching_forum['title_toggle'], 'S_WATCHING_FORUM' => $s_watching_forum['is_watching'], 'S_FORUM_ACTION' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . (($start == 0) ? '' : "&start=$start")), 'S_DISPLAY_SEARCHBOX' => ($auth->acl_get('u_search') && $auth->acl_get('f_search', $forum_id) && $config['load_search']) ? true : false, @@ -590,9 +594,11 @@ if ($s_display_active) // otherwise the number is different from the one on the forum list $total_topic_count = $topics_count - sizeof($global_announce_forums); +$base_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '')); +phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $topics_count, $config['topics_per_page'], $start); + $template->assign_vars(array( - 'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '')), $topics_count, $config['topics_per_page'], $start), - 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start), + 'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $topics_count, $config['topics_per_page'], $start), 'TOTAL_TOPICS' => ($s_display_active) ? false : $user->lang('VIEW_FORUM_TOPICS', (int) $total_topic_count), )); @@ -702,7 +708,6 @@ if (sizeof($topic_list)) 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - 'PAGINATION' => topic_generate_pagination($replies, $view_topic_url), 'REPLIES' => $replies, 'VIEWS' => $row['topic_views'], 'TOPIC_TITLE' => censor_text($row['topic_title']), @@ -744,6 +749,8 @@ if (sizeof($topic_list)) 'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test) ); + phpbb_generate_template_pagination($template, $view_topic_url, 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true); + $s_type_switch = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0; if ($unread_topic) |