You are here

function page_theme_admin_delete_submit in Page Theme 7.2

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

File

./page_theme.admin.inc, line 302
Admin page callbacks for the page_theme module.

Code

function page_theme_admin_delete_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    db_delete('page_theme')
      ->condition('ptid', $form_state['values']['ptid'])
      ->execute();
    db_delete('page_theme_role')
      ->condition('ptid', $form_state['values']['ptid'])
      ->execute();
    drupal_set_message(t('The rule has been deleted.'));
    $form_state['redirect'] = 'admin/appearance/page-theme';
    return;
  }
}