aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/search
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-03-18 14:30:47 +0000
committerNils Adermann <naderman@naderman.de>2006-03-18 14:30:47 +0000
commit9f7bc931259522fe7ae1ea9d6b5f4b17b60c97ad (patch)
tree96686f10c69d0dedfe966c4ead240f4169013656 /phpBB/includes/search
parentd9c48b494c6b0b2cf49670eaa5fdb503e1312557 (diff)
downloadforums-9f7bc931259522fe7ae1ea9d6b5f4b17b60c97ad.tar
forums-9f7bc931259522fe7ae1ea9d6b5f4b17b60c97ad.tar.gz
forums-9f7bc931259522fe7ae1ea9d6b5f4b17b60c97ad.tar.bz2
forums-9f7bc931259522fe7ae1ea9d6b5f4b17b60c97ad.tar.xz
forums-9f7bc931259522fe7ae1ea9d6b5f4b17b60c97ad.zip
- Lesson learned: If you rename something rename it in all places and not just in a few :)
(min_search_chars/max_search_chars/load_search_upd now prefixed with fulltext_phpbb) - search_indexing_state should not be dynamic - a topic link should link to a topic ;-) git-svn-id: file:///svn/phpbb/trunk@5652 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/search')
-rw-r--r--phpBB/includes/search/fulltext_mysql.php5
-rw-r--r--phpBB/includes/search/fulltext_phpbb.php13
2 files changed, 14 insertions, 4 deletions
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php
index 74ffa08a81..28f4064aef 100644
--- a/phpBB/includes/search/fulltext_mysql.php
+++ b/phpBB/includes/search/fulltext_mysql.php
@@ -21,9 +21,14 @@ include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
class fulltext_mysql extends search_backend
{
var $stats;
+ var $word_length;
function fulltext_mysql(&$error)
{
+ global $config;
+
+ $this->word_length = array('min' => $config['fulltext_mysql_min_word_len'], 'max' => $config['fulltext_mysql_max_word_len']);
+
$error = false;
}
diff --git a/phpBB/includes/search/fulltext_phpbb.php b/phpBB/includes/search/fulltext_phpbb.php
index 341e9abb87..a1baecc2d2 100644
--- a/phpBB/includes/search/fulltext_phpbb.php
+++ b/phpBB/includes/search/fulltext_phpbb.php
@@ -21,9 +21,14 @@ include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
class fulltext_phpbb extends search_backend
{
var $stats;
+ var $word_length;
function fulltext_phpbb(&$error)
{
+ global $config;
+
+ $this->word_length = array('min' => $config['fulltext_phpbb_min_search_chars'], 'max' => $config['fulltext_phpbb_max_search_chars']);
+
$error = false;
}
@@ -89,7 +94,7 @@ class fulltext_phpbb extends search_backend
// check word length
$clean_len = strlen(str_replace('*', '', $word));
- if (($clean_len < $config['min_search_chars']) || ($clean_len > $config['max_search_chars']))
+ if (($clean_len < $config['fulltext_phpbb_min_search_chars']) || ($clean_len > $config['fulltext_phpbb_max_search_chars']))
{
if ($prefixed)
{
@@ -194,7 +199,7 @@ class fulltext_phpbb extends search_backend
for ($i = 0, $n = sizeof($text); $i < $n; $i++)
{
$text[$i] = trim($text[$i]);
- if (strlen($text[$i]) < $config['min_search_chars'] || strlen($text[$i]) > $config['max_search_chars'])
+ if (strlen($text[$i]) < $config['fulltext_phpbb_min_search_chars'] || strlen($text[$i]) > $config['fulltext_phpbb_max_search_chars'])
{
unset($text[$i]);
}
@@ -712,7 +717,7 @@ class fulltext_phpbb extends search_backend
// Is the fulltext indexer disabled? If yes then we need not
// carry on ... it's okay ... I know when I'm not wanted boo hoo
- if (!$config['load_search_upd'])
+ if (!$config['fulltext_phpbb_load_search_upd'])
{
return;
}
@@ -882,7 +887,7 @@ class fulltext_phpbb extends search_backend
// Is the fulltext indexer disabled? If yes then we need not
// carry on ... it's okay ... I know when I'm not wanted boo hoo
- if (!$config['load_search_upd'])
+ if (!$config['fulltext_phpbb_load_search_upd'])
{
return;
}