mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
Do not show non indexed forums on the search page if they contain no subforums. #33125
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8834 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
e22a26609f
commit
a5761193c2
2 changed files with 8 additions and 1 deletions
|
@ -115,6 +115,7 @@
|
||||||
<li>[Fix] Sync reports when using the move all users posts tool in the ACP. (Bug #31165)</li>
|
<li>[Fix] Sync reports when using the move all users posts tool in the ACP. (Bug #31165)</li>
|
||||||
<li>[Fix] Extra slash is included in the redirect url when redirecting to the forum root directory. (Bug #33605)</li>
|
<li>[Fix] Extra slash is included in the redirect url when redirecting to the forum root directory. (Bug #33605)</li>
|
||||||
<li>[Fix] Remove reported flag from shadow topics when closing reports. (Bug #19765)</li>
|
<li>[Fix] Remove reported flag from shadow topics when closing reports. (Bug #19765)</li>
|
||||||
|
<li>[Fix] Do not show non indexed forums on the search page if they contain no subforums. (Bug #33125)</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -923,7 +923,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||||
|
|
||||||
// Search forum
|
// Search forum
|
||||||
$s_forums = '';
|
$s_forums = '';
|
||||||
$sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.left_id, f.right_id, f.forum_password, fa.user_id
|
$sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.left_id, f.right_id, f.forum_password, f.enable_indexing, fa.user_id
|
||||||
FROM ' . FORUMS_TABLE . ' f
|
FROM ' . FORUMS_TABLE . ' f
|
||||||
LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa ON (fa.forum_id = f.forum_id
|
LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa ON (fa.forum_id = f.forum_id
|
||||||
AND fa.session_id = '" . $db->sql_escape($user->session_id) . "')
|
AND fa.session_id = '" . $db->sql_escape($user->session_id) . "')
|
||||||
|
@ -942,6 +942,12 @@ while ($row = $db->sql_fetchrow($result))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($row['forum_type'] == FORUM_POST && ($row['left_id'] + 1 == $row['right_id']) && !$row['enable_indexing'])
|
||||||
|
{
|
||||||
|
// Postable forum with no subforums and indexing disabled, don't display
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ($row['forum_type'] == FORUM_LINK || ($row['forum_password'] && !$row['user_id']))
|
if ($row['forum_type'] == FORUM_LINK || ($row['forum_password'] && !$row['user_id']))
|
||||||
{
|
{
|
||||||
// if this forum is a link or password protected (user has not entered the password yet) then skip to the next branch
|
// if this forum is a link or password protected (user has not entered the password yet) then skip to the next branch
|
||||||
|
|
Loading…
Add table
Reference in a new issue