diff options
| author | Nils Adermann <naderman@naderman.de> | 2006-01-11 21:52:41 +0000 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2006-01-11 21:52:41 +0000 |
| commit | 09edf1e1a59f245164a157f60231e8e656961e7e (patch) | |
| tree | d049ea93189e43fe0dd9c9ec003d38b122ca2d97 /phpBB/search.php | |
| parent | 0e0b1120fba8ed4f2ebc5d62eb29b1a34c1b1007 (diff) | |
| download | forums-09edf1e1a59f245164a157f60231e8e656961e7e.tar forums-09edf1e1a59f245164a157f60231e8e656961e7e.tar.gz forums-09edf1e1a59f245164a157f60231e8e656961e7e.tar.bz2 forums-09edf1e1a59f245164a157f60231e8e656961e7e.tar.xz forums-09edf1e1a59f245164a157f60231e8e656961e7e.zip | |
somehow I knew this had to happen :(
(just two very tiny changes to the previous commit)
git-svn-id: file:///svn/phpbb/trunk@5443 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/search.php')
| -rw-r--r-- | phpBB/search.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/search.php b/phpBB/search.php index fceab40459..2b2151ba10 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -84,12 +84,12 @@ if ($keywords || $author || $search_id) // Which forums should not be searched? $ex_fid_ary = array_keys($auth->acl_getf('!f_read', true)); + $not_in_fid = (sizeof($ex_fid_ary)) ? 'f.forum_id NOT IN (' . implode(', ', $ex_fid_ary) . ') OR ' : ''; $sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.right_id, f.forum_password, 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->data['session_id']) . "') - WHERE f.forum_id NOT IN (" . implode(', ', $ex_fid_ary) . ") - OR (f.forum_password <> '' AND fa.user_id <> " . (int) $user->data['user_id'] . ') + WHERE $not_in_fid(f.forum_password <> '' AND fa.user_id <> " . (int) $user->data['user_id'] . ') ORDER BY f.left_id'; $result = $db->sql_query($sql); |
