diff options
Diffstat (limited to 'modules/search')
-rw-r--r-- | modules/search/search.module | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/search/search.module b/modules/search/search.module index bf5eaa880..13fcde6de 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -215,11 +215,7 @@ function search_cron() { $total = db_result(db_query("SELECT SUM(score) FROM {search_index} WHERE word = '%s'", $word)); db_query("UPDATE {search_total} SET count = %d WHERE word = '%s'", $total, $word); if (!db_affected_rows()) { - // Note: affected rows does not count matching rows that already had the right value! - $exists = db_result(db_query("SELECT COUNT(*) FROM {search_total} WHERE word = '%s'", $word)); - if (!$exists) { - db_query("INSERT INTO {search_total} (word, count) VALUES ('%s', %d)", $word, $total); - } + db_query("INSERT INTO {search_total} (word, count) VALUES ('%s', %d)", $word, $total); } } // Find words that were deleted from search_index, but are still in |