mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8751 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
191e582323
commit
6926a35902
3 changed files with 23 additions and 13 deletions
|
@ -96,6 +96,7 @@
|
||||||
<li>[Fix] Added VST - Venezuela Standard Time (Bug #30545).</li>
|
<li>[Fix] Added VST - Venezuela Standard Time (Bug #30545).</li>
|
||||||
<li>[Fix] Close DB connections in file.php.</li>
|
<li>[Fix] Close DB connections in file.php.</li>
|
||||||
<li>[Change] Set headers to allow browsers to better cache attachments (Mylek pointed this out)</li>
|
<li>[Change] Set headers to allow browsers to better cache attachments (Mylek pointed this out)</li>
|
||||||
|
<li>[Change] Hide parameters if they equal the default (Bug #31185)</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -26,9 +26,13 @@ $forum_id = request_var('f', 0);
|
||||||
$mark_read = request_var('mark', '');
|
$mark_read = request_var('mark', '');
|
||||||
$start = request_var('start', 0);
|
$start = request_var('start', 0);
|
||||||
|
|
||||||
$sort_days = request_var('st', ((!empty($user->data['user_topic_show_days'])) ? $user->data['user_topic_show_days'] : 0));
|
$default_sort_days = (!empty($user->data['user_post_show_days'])) ? $user->data['user_post_show_days'] : 0;
|
||||||
$sort_key = request_var('sk', ((!empty($user->data['user_topic_sortby_type'])) ? $user->data['user_topic_sortby_type'] : 't'));
|
$default_sort_key = (!empty($user->data['user_post_sortby_type'])) ? $user->data['user_post_sortby_type'] : 't';
|
||||||
$sort_dir = request_var('sd', ((!empty($user->data['user_topic_sortby_dir'])) ? $user->data['user_topic_sortby_dir'] : 'd'));
|
$default_sort_dir = (!empty($user->data['user_post_sortby_dir'])) ? $user->data['user_post_sortby_dir'] : 'd';
|
||||||
|
|
||||||
|
$sort_days = request_var('st', $default_sort_days);
|
||||||
|
$sort_key = request_var('sk', $default_sort_key);
|
||||||
|
$sort_dir = request_var('sd', $default_sort_dir);
|
||||||
|
|
||||||
// Check if the user has actually sent a forum ID with his/her request
|
// Check if the user has actually sent a forum ID with his/her request
|
||||||
// If not give them a nice error page.
|
// If not give them a nice error page.
|
||||||
|
@ -212,7 +216,7 @@ $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIM
|
||||||
$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views');
|
$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views');
|
||||||
|
|
||||||
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
|
$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);
|
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, $default_sort_days, $default_sort_key, $default_sort_dir);
|
||||||
|
|
||||||
// Limit topics to certain time frame, obtain correct topic count
|
// Limit topics to certain time frame, obtain correct topic count
|
||||||
// global announcements must not be counted, normal announcements have to
|
// global announcements must not be counted, normal announcements have to
|
||||||
|
@ -302,7 +306,7 @@ $template->assign_vars(array(
|
||||||
|
|
||||||
'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&i=main&mode=forum_view", true, $user->session_id) : '',
|
'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&i=main&mode=forum_view", true, $user->session_id) : '',
|
||||||
'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=post&f=' . $forum_id) : '',
|
'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=post&f=' . $forum_id) : '',
|
||||||
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&$u_sort_param&start=$start"),
|
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . "&start=$start"),
|
||||||
'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&mark=topics") : '',
|
'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&mark=topics") : '',
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -514,7 +518,7 @@ if ($s_display_active)
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&$u_sort_param"), $topics_count, $config['topics_per_page'], $start),
|
'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' => on_page($topics_count, $config['topics_per_page'], $start),
|
||||||
'TOTAL_TOPICS' => ($s_display_active) ? false : (($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count)))
|
'TOTAL_TOPICS' => ($s_display_active) ? false : (($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count)))
|
||||||
);
|
);
|
||||||
|
|
|
@ -31,9 +31,13 @@ $voted_id = request_var('vote_id', array('' => 0));
|
||||||
$start = request_var('start', 0);
|
$start = request_var('start', 0);
|
||||||
$view = request_var('view', '');
|
$view = request_var('view', '');
|
||||||
|
|
||||||
$sort_days = request_var('st', ((!empty($user->data['user_post_show_days'])) ? $user->data['user_post_show_days'] : 0));
|
$default_sort_days = (!empty($user->data['user_post_show_days'])) ? $user->data['user_post_show_days'] : 0;
|
||||||
$sort_key = request_var('sk', ((!empty($user->data['user_post_sortby_type'])) ? $user->data['user_post_sortby_type'] : 't'));
|
$default_sort_key = (!empty($user->data['user_post_sortby_type'])) ? $user->data['user_post_sortby_type'] : 't';
|
||||||
$sort_dir = request_var('sd', ((!empty($user->data['user_post_sortby_dir'])) ? $user->data['user_post_sortby_dir'] : 'a'));
|
$default_sort_dir = (!empty($user->data['user_post_sortby_dir'])) ? $user->data['user_post_sortby_dir'] : 'a';
|
||||||
|
|
||||||
|
$sort_days = request_var('st', $default_sort_days);
|
||||||
|
$sort_key = request_var('sk', $default_sort_key);
|
||||||
|
$sort_dir = request_var('sd', $default_sort_dir);
|
||||||
|
|
||||||
$update = request_var('update', false);
|
$update = request_var('update', false);
|
||||||
|
|
||||||
|
@ -388,7 +392,8 @@ $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIM
|
||||||
$sort_by_sql = array('a' => 'u.username_clean', 't' => 'p.post_time', 's' => 'p.post_subject');
|
$sort_by_sql = array('a' => 'u.username_clean', 't' => 'p.post_time', 's' => 'p.post_subject');
|
||||||
|
|
||||||
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
|
$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);
|
|
||||||
|
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, $default_sort_days, $default_sort_key, $default_sort_dir);
|
||||||
|
|
||||||
// Obtain correct post count and ordering SQL if user has
|
// Obtain correct post count and ordering SQL if user has
|
||||||
// requested anything different
|
// requested anything different
|
||||||
|
@ -442,7 +447,7 @@ if ($start < 0 || $start > $total_posts)
|
||||||
}
|
}
|
||||||
|
|
||||||
// General Viewtopic URL for return links
|
// General Viewtopic URL for return links
|
||||||
$viewtopic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&start=$start&$u_sort_param" . (($highlight_match) ? "&hilit=$highlight" : ''));
|
$viewtopic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&start=$start" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($highlight_match) ? "&hilit=$highlight" : ''));
|
||||||
|
|
||||||
// Are we watching this topic?
|
// Are we watching this topic?
|
||||||
$s_watching_topic = array(
|
$s_watching_topic = array(
|
||||||
|
@ -523,7 +528,7 @@ $topic_mod .= ($allow_change_type && $auth->acl_get('f_announce', $forum_id) &&
|
||||||
$topic_mod .= ($auth->acl_get('m_', $forum_id)) ? '<option value="topic_logs">' . $user->lang['VIEW_TOPIC_LOGS'] . '</option>' : '';
|
$topic_mod .= ($auth->acl_get('m_', $forum_id)) ? '<option value="topic_logs">' . $user->lang['VIEW_TOPIC_LOGS'] . '</option>' : '';
|
||||||
|
|
||||||
// If we've got a hightlight set pass it on to pagination.
|
// If we've got a hightlight set pass it on to pagination.
|
||||||
$pagination = generate_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&$u_sort_param" . (($highlight_match) ? "&hilit=$highlight" : '')), $total_posts, $config['posts_per_page'], $start);
|
$pagination = generate_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($highlight_match) ? "&hilit=$highlight" : '')), $total_posts, $config['posts_per_page'], $start);
|
||||||
|
|
||||||
// Navigation links
|
// Navigation links
|
||||||
generate_forum_nav($topic_data);
|
generate_forum_nav($topic_data);
|
||||||
|
@ -557,7 +562,7 @@ $template->assign_vars(array(
|
||||||
'PAGINATION' => $pagination,
|
'PAGINATION' => $pagination,
|
||||||
'PAGE_NUMBER' => on_page($total_posts, $config['posts_per_page'], $start),
|
'PAGE_NUMBER' => on_page($total_posts, $config['posts_per_page'], $start),
|
||||||
'TOTAL_POSTS' => ($total_posts == 1) ? $user->lang['VIEW_TOPIC_POST'] : sprintf($user->lang['VIEW_TOPIC_POSTS'], $total_posts),
|
'TOTAL_POSTS' => ($total_posts == 1) ? $user->lang['VIEW_TOPIC_POST'] : sprintf($user->lang['VIEW_TOPIC_POSTS'], $total_posts),
|
||||||
'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=topic_view&f=$forum_id&t=$topic_id&start=$start&$u_sort_param", true, $user->session_id) : '',
|
'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=topic_view&f=$forum_id&t=$topic_id&start=$start" . ((strlen($u_sort_param)) ? "&$u_sort_param" : ''), true, $user->session_id) : '',
|
||||||
'MODERATORS' => (isset($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id])) ? implode(', ', $forum_moderators[$forum_id]) : '',
|
'MODERATORS' => (isset($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id])) ? implode(', ', $forum_moderators[$forum_id]) : '',
|
||||||
|
|
||||||
'POST_IMG' => ($topic_data['forum_status'] == ITEM_LOCKED) ? $user->img('button_topic_locked', 'FORUM_LOCKED') : $user->img('button_topic_new', 'POST_NEW_TOPIC'),
|
'POST_IMG' => ($topic_data['forum_status'] == ITEM_LOCKED) ? $user->img('button_topic_locked', 'FORUM_LOCKED') : $user->img('button_topic_new', 'POST_NEW_TOPIC'),
|
||||||
|
|
Loading…
Add table
Reference in a new issue