You are here

function boost_reset_crawler_submit in Boost 6

Reset Crawler

1 call to boost_reset_crawler_submit()
boost_admin_button_router in ./boost.admin.inc
1 string reference to 'boost_reset_crawler_submit'
boost_admin_boost_performance_page in ./boost.admin.inc
Form builder; Displays Boost's configuration page.

File

./boost.admin.inc, line 1678
All the code for the Boost module's administrative interface.

Code

function boost_reset_crawler_submit($form, &$form_state, $first = TRUE) {

  // Temp fix for bug in form api & buttons
  // Check to make sure this button was actually called
  if (!boost_admin_button_router(3, $first, $form, $form_state)) {
    return FALSE;
  }
  db_query("DELETE FROM {variable} WHERE name LIKE '%s%%'", 'boost_crawl');
  db_query("DELETE FROM {variable} WHERE name = 'cron_semaphore'");
  cache_clear_all('variables', 'cache');
  variable_set('boost_crawler_key', md5(mt_rand()));
  drupal_set_message(t('Boost: Crawler variables reset & cron semaphore cleared (cron reset)'));
}