You are here

function skinr_ui_multiple_delete_confirm_submit in Skinr 7.2

Same name and namespace in other branches
  1. 8.2 skinr_ui/skinr_ui.admin.inc \skinr_ui_multiple_delete_confirm_submit()

Form submission handler for skinr_ui_multiple_delete_confirm().

1 string reference to 'skinr_ui_multiple_delete_confirm_submit'
skinr_ui_multiple_delete_confirm in ./skinr_ui.admin.inc
Form builder for the confirmation form when deleting multiple Skinr settings.

File

./skinr_ui.admin.inc, line 606
Admin page callbacks for the Skinr UI module.

Code

function skinr_ui_multiple_delete_confirm_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    skinr_skin_delete_multiple(array_keys($form_state['values']['skins']));
    $count = count($form_state['values']['skins']);
    if ($count == 1) {
      watchdog('skinr', 'Deleted 1 skin configuration.');
    }
    else {
      watchdog('content', 'Deleted @count skin configurations.', array(
        '@count' => $count,
      ));
    }
    drupal_set_message(format_plural($count, 'Deleted 1 skin configuration.', 'Deleted @count skin configurations.'));
  }
  $form_state['redirect'] = 'admin/structure/skinr';
}