You are here

function homebox_admin_flush_form_submit in Homebox 7.3

Same name and namespace in other branches
  1. 6.3 homebox.admin.inc \homebox_admin_flush_form_submit()
  2. 6.2 homebox.admin.inc \homebox_admin_flush_form_submit()
  3. 7.2 homebox.admin.inc \homebox_admin_flush_form_submit()

Submit homebox_admin_flush_form()

File

./homebox.admin.inc, line 622
Homebox admin file, takes care admin interface for homebox

Code

function homebox_admin_flush_form_submit(&$form, &$form_state) {

  // Load the page
  $page = homebox_get_page($form_state['values']['name']);
  if ($page) {
    if (homebox_flush_settings($page)) {
      drupal_set_message(t('Settings flushed successfully for !name', array(
        '!name' => $page->name,
      )));
    }
    else {
      drupal_set_message(t('An error has occurred while trying to flush settings for !name', array(
        '!name' => $page->name,
      )));
    }
  }
  else {
    drupal_set_message(t('An error occured has occured'), 'error');
  }
  $form_state['redirect'] = 'admin/structure/homebox';
}