aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2008-09-08 13:39:34 +0000
committerChris Smith <toonarmy@phpbb.com>2008-09-08 13:39:34 +0000
commit0e0100c5255dd288cc479274a112e4eb42a4bacf (patch)
tree1013fd8ea222d4e4fbab3d360fc25be2d59218b0 /phpBB/search.php
parenta32f3a67095327dc3e75c01ba21bbb90ad479c83 (diff)
downloadforums-0e0100c5255dd288cc479274a112e4eb42a4bacf.tar
forums-0e0100c5255dd288cc479274a112e4eb42a4bacf.tar.gz
forums-0e0100c5255dd288cc479274a112e4eb42a4bacf.tar.bz2
forums-0e0100c5255dd288cc479274a112e4eb42a4bacf.tar.xz
forums-0e0100c5255dd288cc479274a112e4eb42a4bacf.zip
merge r8829, r8830, r8831, r8832, r8833, r8834, r8835, r8836, r8837, r8838
git-svn-id: file:///svn/phpbb/trunk@8839 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index 13f82cfebc..2e6ec89662 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -923,7 +923,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
// Search forum
$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
LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa ON (fa.forum_id = f.forum_id
AND fa.session_id = '" . $db->sql_escape($user->session_id) . "')
@@ -942,6 +942,12 @@ while ($row = $db->sql_fetchrow($result))
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 this forum is a link or password protected (user has not entered the password yet) then skip to the next branch