You are here

function search_cron in Drupal 6

Same name and namespace in other branches
  1. 8 core/modules/search/search.module \search_cron()
  2. 4 modules/search.module \search_cron()
  3. 5 modules/search/search.module \search_cron()
  4. 7 modules/search/search.module \search_cron()
  5. 9 core/modules/search/search.module \search_cron()
  6. 10 core/modules/search/search.module \search_cron()

Implementation of hook_cron().

Fires hook_update_index() in all modules and cleans up dirty words (see search_dirty).

File

modules/search/search.module, line 265
Enables site-wide keyword searching.

Code

function search_cron() {

  // We register a shutdown function to ensure that search_total is always up
  // to date.
  register_shutdown_function('search_update_totals');

  // Update word index
  foreach (module_list() as $module) {
    module_invoke($module, 'update_index');
  }
}