You are here

function top_searches_form_clear in Top Searches 5

Same name and namespace in other branches
  1. 6 top_searches.admin.inc \top_searches_form_clear()
  2. 7 top_searches.admin.inc \top_searches_form_clear()

Clears the Top Searches table

1 string reference to 'top_searches_form_clear'
top_searches_menu in ./top_searches.module
Implementation of hook_menu().

File

./top_searches.module, line 61

Code

function top_searches_form_clear() {

  // We first set the message, so we have the right number of rows
  drupal_set_message(t("The Top Searches counters were reset. @number records were deleted", array(
    '@number' => top_searches_count_rows(),
  )));
  db_query("TRUNCATE {top_searches}");
  drupal_goto('admin/settings/top_searches');
}