You are here

function search_log_confirm_truncate_submit in Search Log 6

Same name and namespace in other branches
  1. 7 search_log.admin.inc \search_log_confirm_truncate_submit()

Truncate search_log table.

File

./search_log.admin.inc, line 103
Admin page callbacks file for the search_log module.

Code

function search_log_confirm_truncate_submit($form, &$form_state) {
  db_query("TRUNCATE {search_log}");
  drupal_set_message(t('The Search log has been cleared.'));
  if (!isset($_REQUEST['destination'])) {
    $form_state['redirect'] = 'admin/settings/search/search_log';
  }
}