From 07d1ebb264bd4d6d6afab9513a8b00c3a615c16e Mon Sep 17 00:00:00 2001 From: David M Date: Wed, 14 Mar 2007 03:19:58 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: file:///svn/phpbb/trunk@7186 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/search/fulltext_native.php | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index 4cb5a9f503..dcf240175a 100755 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -1221,14 +1221,21 @@ class fulltext_native extends search_backend } $db->sql_freeresult($result); - $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . ' - SET word_count = word_count - 1 - WHERE ' . $db->sql_in_set('word_id', $title_word_ids); - $db->sql_query($sql); - $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . ' - SET word_count = word_count - 1 - WHERE ' . $db->sql_in_set('word_id', $message_word_ids); - $db->sql_query($sql); + if (sizeof($title_word_ids)) + { + $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . ' + SET word_count = word_count - 1 + WHERE ' . $db->sql_in_set('word_id', $title_word_ids); + $db->sql_query($sql); + } + + if (sizeof($message_word_ids)) + { + $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . ' + SET word_count = word_count - 1 + WHERE ' . $db->sql_in_set('word_id', $message_word_ids); + $db->sql_query($sql); + } unset($title_word_ids); unset($message_word_ids);