function key_config_delete_confirm_submit in Key 7.2
Same name and namespace in other branches
- 7.3 includes/key.admin.inc \key_config_delete_confirm_submit()
Submit handler for key_config_delete_confirm().
File
- includes/
key.admin.inc, line 314 - Administrative functionality for managing key configurations.
Code
function key_config_delete_confirm_submit($form, &$form_state) {
$config = key_get_config($form_state['values']['name']);
$provider = key_get_provider($config['provider']);
if ($delete_callback = ctools_plugin_get_function($provider, 'delete form submit')) {
call_user_func($delete_callback, $config);
}
db_delete('key_config')
->condition('name', $form_state['values']['name'])
->execute();
$t_args = array(
'%label' => $form_state['values']['label'],
);
drupal_set_message(t('The key %label has been deleted.', $t_args));
watchdog('key', 'Deleted key %label.', $t_args, WATCHDOG_NOTICE);
$form_state['redirect'] = KEY_MENU_PATH;
}