mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-14 21:56:39 +02:00
Enable/disable fulltext index updating
git-svn-id: file:///svn/phpbb/trunk@3844 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@ -622,6 +622,13 @@ class fulltext_search
|
||||
|
||||
static $drop_char_match, $drop_char_replace, $stopwords, $synonyms;
|
||||
|
||||
// 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 (empty($config['load_search_upd']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (empty($drop_char_match))
|
||||
{
|
||||
$drop_char_match = array('^', '$', '&', '(', ')', '<', '>', '`', '\'', '"', '|', ',', '@', '_', '?', '%', '-', '~', '+', '.', '[', ']', '{', '}', ':', '\\', '/', '=', '#', '\'', ';', '!', '*');
|
||||
@ -674,6 +681,13 @@ class fulltext_search
|
||||
{
|
||||
global $config, $db;
|
||||
|
||||
// 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 (empty($config['load_search_upd']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// $mtime = explode(' ', microtime());
|
||||
// $starttime = $mtime[1] + $mtime[0];
|
||||
|
||||
@ -812,7 +826,14 @@ class fulltext_search
|
||||
// words no longer referenced in the match table, etc.
|
||||
function search_tidy()
|
||||
{
|
||||
global $db;
|
||||
global $db, $config;
|
||||
|
||||
// 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 (empty($config['load_search_upd']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove common (> 60% of posts ) words
|
||||
$result = $db->sql_query("SELECT SUM(forum_posts) AS total_posts FROM " . FORUMS_TABLE);
|
||||
|
Reference in New Issue
Block a user