You are here

function site_verify_delete_form_submit in Site verification 7.2

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

File

./site_verify.admin.inc, line 294

Code

function site_verify_delete_form_submit($form, &$form_state) {
  $record = $form_state['values']['record'];
  db_delete('site_verify')
    ->condition('svid', $record['svid'])
    ->execute();
  drupal_set_message(t('Verification for %engine has been deleted.', array(
    '%engine' => $record['engine']['name'],
  )));
  watchdog('site_verify', 'Verification for %engine deleted.', array(
    '%engine' => $record['engine']['name'],
  ), WATCHDOG_NOTICE);
  $form_state['redirect'] = 'admin/config/search/verifications';

  // Clear front page caches and set the menu to be rebuilt.
  cache_clear_all(url('<front>', array(
    'absolute' => TRUE,
  )), 'cache_page');
  cache_clear_all(url(variable_get('site_frontpage', 'node'), array(
    'absolute' => TRUE,
  )), 'cache_page');
  variable_set('menu_rebuild_needed', TRUE);
}