diff options
author | Nils Adermann <naderman@naderman.de> | 2007-04-09 16:04:30 +0000 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2007-04-09 16:04:30 +0000 |
commit | 405b22f64e6bc1857f1265e10207707f34c2f3c3 (patch) | |
tree | d3d67fae02cc092ddb0b8bd0b4991b1d023a7114 /phpBB/includes | |
parent | 7cbf74bfcafc5bb6b7971a9b06e24c248cce9120 (diff) | |
download | forums-405b22f64e6bc1857f1265e10207707f34c2f3c3.tar forums-405b22f64e6bc1857f1265e10207707f34c2f3c3.tar.gz forums-405b22f64e6bc1857f1265e10207707f34c2f3c3.tar.bz2 forums-405b22f64e6bc1857f1265e10207707f34c2f3c3.tar.xz forums-405b22f64e6bc1857f1265e10207707f34c2f3c3.zip |
- correctly initialise $words in fulltext_native [Bug #347]
- display ignored words from sub-search-queries
- "Return to search page" [Bug #9591]
- spelling in coding guidelines
- htmlspecialchars forwarded_for before logging
git-svn-id: file:///svn/phpbb/trunk@7310 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rwxr-xr-x | phpBB/includes/search/fulltext_native.php | 11 | ||||
-rw-r--r-- | phpBB/includes/session.php | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index 66d64d3b66..35c1d9f24d 100755 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -187,7 +187,7 @@ class fulltext_native extends search_backend preg_match_all('#([^\\s+\\-|*()]+)(?:$|[\\s+\\-|()])#u', $keywords, $exact_words); $exact_words = $exact_words[1]; - $common_ids = array(); + $common_ids = $words = array(); if (sizeof($exact_words)) { @@ -287,6 +287,14 @@ class fulltext_native extends search_backend $id_words[] = $words[$word_part]; $non_common_words[] = $word_part; } + else + { + $len = utf8_strlen($word_part); + if ($len < $this->word_length['min'] || $len > $this->word_length['max']) + { + $this->common_words[] = $word_part; + } + } } if (sizeof($id_words)) { @@ -311,7 +319,6 @@ class fulltext_native extends search_backend // else we only need one id else if (($wildcard = strpos($word, '*') !== false) || isset($words[$word])) { - if ($wildcard) { $len = utf8_strlen(str_replace('*', '', $word)); diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index fc380436d3..1dfeb43fd3 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -301,7 +301,7 @@ class session // Added logging temporarly to help debug bugs... if (defined('DEBUG_EXTRA')) { - add_log('critical', 'LOG_IP_BROWSER_FORWARDED_CHECK', $u_ip, $s_ip, $u_browser, $s_browser, $u_forwarded_for, $s_forwarded_for); + add_log('critical', 'LOG_IP_BROWSER_FORWARDED_CHECK', $u_ip, $s_ip, $u_browser, $s_browser, htmlspecialchars($u_forwarded_for), htmlspecialchars($s_forwarded_for)); } } } |