You are here

function page_theme_admin_overview_submit in Page Theme 6

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

File

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

Code

function page_theme_admin_overview_submit($form, &$form_state) {
  foreach ($form_state['values']['themes'] as $theme => $value) {
    $status = $value['status'];
    $weight = $value['weight'];
    db_query('UPDATE {page_theme} SET status = %d, weight = %d WHERE theme = "%s"', $status, $weight, $theme);
  }
  drupal_set_message(t('The configuration has been saved.'));
}