You are here

function page_theme_admin_edit_submit in Page Theme 7

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

File

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

Code

function page_theme_admin_edit_submit($form, &$form_state) {
  $field = array();
  $field['pages'] = $form_state['values']['pages'];
  $field['status'] = intval(is_string($form_state['values']['status']['enabled']));
  $field['weight'] = $form_state['values']['weight'];
  db_update('page_theme')
    ->fields($field)
    ->condition('theme', $form_state['values']['theme'])
    ->execute();
  drupal_set_message(t('The theme has been updated.'));
  $form_state['redirect'] = 'admin/structure/page-theme';
}