From 11b76dcc8b1279d9109b06287c67361b412a3cec Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Tue, 15 Apr 2003 23:20:29 +0000 Subject: [PATCH] Enable/disable fulltext index updating git-svn-id: file:///svn/phpbb/trunk@3844 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/message_parser.php | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) 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);