function monolog_profile_delete_form_submit in Monolog 7
Same name and namespace in other branches
- 6 monolog.admin.inc \monolog_profile_delete_form_submit()
Form submission handler for monolog_profile_delete_form().
File
- ./
monolog.admin.inc, line 506 - Administrative settings for the Monolog module.
Code
function monolog_profile_delete_form_submit($form, &$form_state) {
if ($form_state['values']['confirm']) {
$profile = $form['#monolog']['profile'];
$args = array(
'%label' => $profile->options['label'],
);
if (monolog_profile_delete($profile)) {
if ($profile->export_type & EXPORT_IN_CODE) {
drupal_set_message(t('The %label profile has been reverted.', $args));
}
else {
drupal_set_message(t('The %label profile has been removed.', $args));
}
}
else {
drupal_set_message(t('Error removing the %label profile.', $args), 'error');
}
}
$form_state['redirect'] = 'admin/config/development/monolog/profile';
}