You are here

function node_gallery_config_delete_form_submit in Node Gallery 6

Same name and namespace in other branches
  1. 6.2 node_gallery.admin.inc \node_gallery_config_delete_form_submit()

File

./node_gallery.admin.inc, line 417
Node gallery admin file.

Code

function node_gallery_config_delete_form_submit($form, &$form_state) {
  $gallery_config = new gallery_config($form_state['values']);
  if ($gallery_config
    ->delete()) {
    drupal_set_message(t('Gallery type config %name has been deleted.', array(
      '%name' => $gallery_config->gallery_type,
    )));
    watchdog('node_gallery', t('Image gallery delete form: %name deleted.', array(
      '%name' => $gallery_config->gallery_type,
    )), WATCHDOG_NOTICE);
    $form_state['redirect'] = 'admin/build/node_gallery';
  }
}