You are here

function upgrade_status_core_version_form_submit in Upgrade Status 6

Same name and namespace in other branches
  1. 5 upgrade_status.admin.inc \upgrade_status_core_version_form_submit()
  2. 7 upgrade_status.module \upgrade_status_core_version_form_submit()

Set the new Drupal core version in a variable; refresh project data.

File

./upgrade_status.module, line 768
Checks to see if your installed modules are available for the next major release of Drupal.

Code

function upgrade_status_core_version_form_submit($form, &$form_state) {

  // Refresh status if a different version than the default has been selected.
  if ($form_state['values']['upgrade_status_core_version'] != UPGRADE_STATUS_CORE_VERSION) {
    variable_set('upgrade_status_core_version', $form_state['values']['upgrade_status_core_version']);
    upgrade_status_refresh();
  }
  else {
    if (variable_get('upgrade_status_core_version', UPGRADE_STATUS_CORE_VERSION) != UPGRADE_STATUS_CORE_VERSION) {
      variable_del('upgrade_status_core_version');
      upgrade_status_refresh();
    }
    else {
      variable_del('upgrade_status_core_version');
    }
  }
  drupal_set_message(t('The configuration options have been saved.'));
}