You are here

function top_searches_form_clear in Top Searches 7

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

Clears the Top Searches table

1 call to top_searches_form_clear()
top_searches_form_clear_confirm_submit in ./top_searches.admin.inc

File

./top_searches.admin.inc, line 67
Admin options for top_searches module

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/config/search/top_searches');
}