diff options
| author | Nils Adermann <naderman@naderman.de> | 2006-07-12 23:21:57 +0000 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2006-07-12 23:21:57 +0000 |
| commit | 5bf6bc18801a7b0ead230b20060bf20c52edb99f (patch) | |
| tree | ff1a86a246461ce1910ebf1fc84f6b6722455b95 /phpBB/search.php | |
| parent | 44b78d7c8dcb8026d4bb7f3bca0c78e93027a2ac (diff) | |
| download | forums-5bf6bc18801a7b0ead230b20060bf20c52edb99f.tar forums-5bf6bc18801a7b0ead230b20060bf20c52edb99f.tar.gz forums-5bf6bc18801a7b0ead230b20060bf20c52edb99f.tar.bz2 forums-5bf6bc18801a7b0ead230b20060bf20c52edb99f.tar.xz forums-5bf6bc18801a7b0ead230b20060bf20c52edb99f.zip | |
- it's \r\n not \n\r [Bug #3121]
- a few little search bugfixes
- drop in the improved version of the native search based on UTF-8 (still needs some work before it can replace the current native search)
Thanks Ashe :)
git-svn-id: file:///svn/phpbb/trunk@6175 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/search.php')
| -rw-r--r-- | phpBB/search.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/search.php b/phpBB/search.php index 4bdf03a386..fe9ade0dee 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -89,14 +89,14 @@ if ($keywords || $author || $author_id || $search_id || $submit) // Which forums should not be searched? $ex_fid_ary = array_unique(array_merge(array_keys($auth->acl_getf('!f_read', true)), array_keys($auth->acl_getf('!f_search', true)))); - $not_in_fid = (sizeof($ex_fid_ary)) ? 'f.forum_id NOT IN (' . implode(', ', $ex_fid_ary) . ') OR ' : ''; + $not_in_fid = (sizeof($ex_fid_ary)) ? 'WHERE f.forum_id NOT IN (' . implode(', ', $ex_fid_ary) . ") 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 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) . "') - WHERE $not_in_fid(f.forum_password <> '' AND fa.user_id <> " . (int) $user->data['user_id'] . ') - ORDER BY f.left_id'; + $not_in_fid + ORDER BY f.left_id"; $result = $db->sql_query($sql); $right_id = 0; |
