function upgrade_status_core_version_form_submit in Upgrade Status 7
Same name and namespace in other branches
- 5 upgrade_status.admin.inc \upgrade_status_core_version_form_submit()
- 6 upgrade_status.module \upgrade_status_core_version_form_submit()
Set the new Drupal core version in a variable; refresh project data.
@todo Why do we do these shenanigans with the variable and not just let system_settings_form_submit do its thang?
File
- ./
upgrade_status.module, line 998 - 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.'));
}