diff options
| author | Nils Adermann <naderman@naderman.de> | 2006-12-03 18:03:33 +0000 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2006-12-03 18:03:33 +0000 |
| commit | 9d9624a88624ca8850d6fcae60022a6ed9f754fc (patch) | |
| tree | b11d737312e18580d858fb6b16b1cf6e3e678a58 /phpBB/includes/search | |
| parent | 3d38552c6918b5e3b94c885d1c6ff338380528d9 (diff) | |
| download | forums-9d9624a88624ca8850d6fcae60022a6ed9f754fc.tar forums-9d9624a88624ca8850d6fcae60022a6ed9f754fc.tar.gz forums-9d9624a88624ca8850d6fcae60022a6ed9f754fc.tar.bz2 forums-9d9624a88624ca8850d6fcae60022a6ed9f754fc.tar.xz forums-9d9624a88624ca8850d6fcae60022a6ed9f754fc.zip | |
- author search should use clean names for searching [Bug #5752]
- local moderators are moderators too!
- don't show a "word is not contained in any post" message for ignored common words
- bold search words in search error messages [Bug #5762]
git-svn-id: file:///svn/phpbb/trunk@6708 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/search')
| -rwxr-xr-x | phpBB/includes/search/fulltext_native.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index df000f5e04..10c53d78cd 100755 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -187,6 +187,8 @@ class fulltext_native extends search_backend preg_match_all('#([^\\s+\\-|*()]+)(?:$|[\\s+\\-|()])#u', $keywords, $exact_words); $exact_words = $exact_words[1]; + $common_ids = array(); + if (sizeof($exact_words)) { $sql = 'SELECT word_id, word_text, word_common @@ -200,6 +202,7 @@ class fulltext_native extends search_backend if ($row['word_common']) { $this->common_words[] = $row['word_text']; + $common_ids[$row['word_text']] = (int) $row['word_id']; continue; } @@ -316,7 +319,10 @@ class fulltext_native extends search_backend // throw an error if we shall not ignore unexistant words else if (!$ignore_no_id) { - trigger_error(sprintf($user->lang['WORD_IN_NO_POST'], $word)); + if (!isset($common_ids[$word])) + { + trigger_error(sprintf($user->lang['WORD_IN_NO_POST'], $word)); + } } } |
