diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-04-15 23:20:29 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-04-15 23:20:29 +0000 |
commit | 11b76dcc8b1279d9109b06287c67361b412a3cec (patch) | |
tree | 78c290cdd3b2d61e3708d24b154e17eb1356fff6 /phpBB/includes/message_parser.php | |
parent | e9e95c8e1e568eccd1cb6bbf6227ca528a593909 (diff) | |
download | forums-11b76dcc8b1279d9109b06287c67361b412a3cec.tar forums-11b76dcc8b1279d9109b06287c67361b412a3cec.tar.gz forums-11b76dcc8b1279d9109b06287c67361b412a3cec.tar.bz2 forums-11b76dcc8b1279d9109b06287c67361b412a3cec.tar.xz forums-11b76dcc8b1279d9109b06287c67361b412a3cec.zip |
Enable/disable fulltext index updating
git-svn-id: file:///svn/phpbb/trunk@3844 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r-- | phpBB/includes/message_parser.php | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 568fef2265..0b066a413a 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -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); |