search_cron

  1. drupal
    1. 5
    2. 8
    3. 6
    4. 7
Versions
5 – 7 search_cron()

Implements hook_cron().

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

See also

search_dirty()

Code

modules/search/search.module, line 356

<?php
function search_cron() {
  // We register a shutdown function to ensure that search_total is always up
  // to date.
  drupal_register_shutdown_function('search_update_totals');

  foreach (variable_get('search_active_modules', array('node', 'user')) as $module) {
    // Update word index
    module_invoke($module, 'update_index');
  }
}
?>