diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2009-06-17 09:08:24 +0000 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2009-06-17 09:08:24 +0000 |
commit | c9cef63cc62dda2f609cd6f12b8056ad26b38a6a (patch) | |
tree | 6d9d6631b53051e311423cda71d743294d784bc1 /phpBB/search.php | |
parent | ef0eed4d9ef83d7dfbcdd1c78f812ef5e135f279 (diff) | |
download | forums-c9cef63cc62dda2f609cd6f12b8056ad26b38a6a.tar forums-c9cef63cc62dda2f609cd6f12b8056ad26b38a6a.tar.gz forums-c9cef63cc62dda2f609cd6f12b8056ad26b38a6a.tar.bz2 forums-c9cef63cc62dda2f609cd6f12b8056ad26b38a6a.tar.xz forums-c9cef63cc62dda2f609cd6f12b8056ad26b38a6a.zip |
Fix bug #19135 - Exclude forum from active topics option is ignored
Authorised by: acydburn
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9601 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/search.php')
-rw-r--r-- | phpBB/search.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/phpBB/search.php b/phpBB/search.php index cf2e8615c2..5e2a7c2836 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -155,7 +155,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) $not_in_fid = (sizeof($ex_fid_ary)) ? 'WHERE ' . $db->sql_in_set('f.forum_id', $ex_fid_ary, true) . " OR (f.forum_password <> '' AND fa.user_id <> " . (int) $user->data['user_id'] . ')' : ""; - $sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.right_id, f.forum_password, fa.user_id + $sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.right_id, f.forum_password, f.forum_flags, 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) . "') @@ -173,6 +173,13 @@ if ($keywords || $author || $author_id || $search_id || $submit) continue; } + // Exclude forums from active topics + if (!($row['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS) && ($search_id == 'active_topics')) + { + $ex_fid_ary[] = (int) $row['forum_id']; + continue; + } + if (sizeof($search_forum)) { if ($search_child) @@ -308,7 +315,6 @@ if ($keywords || $author || $author_id || $search_id || $submit) $last_post_time = ''; } - if ($sort_key == 'a') { $sort_join = USERS_TABLE . ' u, '; @@ -945,7 +951,6 @@ if ($keywords || $author || $author_id || $search_id || $submit) page_footer(); } - // 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, f.enable_indexing, fa.user_id |