mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-29 10:39:19 +02:00
since we now have several search_ids, all with different default results modes we now always add the sr variable to the URL - Bug #50775
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10117 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
02b2cced5a
commit
fdf19b0d95
@ -372,30 +372,31 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
break;
|
||||
|
||||
case 'unreadposts':
|
||||
$l_search_title = $user->lang['SEARCH_UNREAD'];
|
||||
// force sorting
|
||||
$show_results = 'topics';
|
||||
$sort_key = 't';
|
||||
$sort_by_sql['t'] = 't.topic_last_post_time';
|
||||
$sql_sort = 'ORDER BY ' . $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
|
||||
$sql_where = 'AND t.topic_moved_id = 0
|
||||
' . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
|
||||
' . ((sizeof($ex_fid_ary)) ? 'AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '');
|
||||
$l_search_title = $user->lang['SEARCH_UNREAD'];
|
||||
// force sorting
|
||||
$show_results = 'topics';
|
||||
$sort_key = 't';
|
||||
$sort_by_sql['t'] = 't.topic_last_post_time';
|
||||
$sql_sort = 'ORDER BY ' . $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
|
||||
|
||||
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);
|
||||
$s_sort_key = $s_sort_dir = $u_sort_param = $s_limit_days = '';
|
||||
|
||||
$unread_list = array();
|
||||
$unread_list = get_unread_topics_list($user->data['user_id'], $sql_where, $sql_sort);
|
||||
$sql_where = 'AND t.topic_moved_id = 0
|
||||
' . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
|
||||
' . ((sizeof($ex_fid_ary)) ? 'AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '');
|
||||
|
||||
if (!empty($unread_list))
|
||||
{
|
||||
$sql = 'SELECT t.topic_id
|
||||
FROM ' . TOPICS_TABLE . ' t
|
||||
WHERE ' . $db->sql_in_set('t.topic_id', array_keys($unread_list)) . "
|
||||
$sql_sort";
|
||||
$field = 'topic_id';
|
||||
}
|
||||
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);
|
||||
$s_sort_key = $s_sort_dir = $u_sort_param = $s_limit_days = '';
|
||||
|
||||
$unread_list = array();
|
||||
$unread_list = get_unread_topics_list($user->data['user_id'], $sql_where, $sql_sort);
|
||||
|
||||
if (!empty($unread_list))
|
||||
{
|
||||
$sql = 'SELECT t.topic_id
|
||||
FROM ' . TOPICS_TABLE . ' t
|
||||
WHERE ' . $db->sql_in_set('t.topic_id', array_keys($unread_list)) . "
|
||||
$sql_sort";
|
||||
$field = 'topic_id';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'newposts':
|
||||
@ -541,7 +542,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
$hilit = (strspn($hilit, '*') === strlen($hilit)) ? '' : $hilit;
|
||||
|
||||
$u_hilit = urlencode(htmlspecialchars_decode(str_replace('|', ' ', $hilit)));
|
||||
$u_show_results = ($show_results != 'posts') ? '&sr=' . $show_results : '';
|
||||
$u_show_results = '&sr=' . $show_results;
|
||||
$u_search_forum = implode('&fid%5B%5D=', $search_forum);
|
||||
|
||||
$u_search = append_sid("{$phpbb_root_path}search.$phpEx", $u_sort_param . $u_show_results);
|
||||
|
Loading…
x
Reference in New Issue
Block a user