diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-11-21 17:01:31 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-11-21 17:01:31 +0000 |
commit | 7d21ca61fc3ba3bcde7981a37971beb740e087ae (patch) | |
tree | 2ea8e6d91bbab05cde40c1b971e6b6d65eb6ae6c /modules/system/system.admin.inc | |
parent | 030963e095dfb0a72542a4fc08d53d1767d0e158 (diff) | |
download | brdo-7d21ca61fc3ba3bcde7981a37971beb740e087ae.tar.gz brdo-7d21ca61fc3ba3bcde7981a37971beb740e087ae.tar.bz2 |
#634440 follow-up by sun: More fixes post-form_state storage removal.
Diffstat (limited to 'modules/system/system.admin.inc')
-rw-r--r-- | modules/system/system.admin.inc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 374170357..d526d2f7f 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -677,7 +677,7 @@ function system_modules($form, $form_state = array()) { uasort($files, 'system_sort_modules_by_info_name'); // If the modules form was submitted, then system_modules_submit() runs first - // and if there are unfilled required modules, then form_state['storage'] is + // and if there are unfilled required modules, then $form_state['storage'] is // filled, triggering a rebuild. In this case we need to display a // confirmation form. if (!empty($form_state['storage'])) { @@ -925,7 +925,7 @@ function system_modules_submit($form, &$form_state) { include_once DRUPAL_ROOT . '/includes/install.inc'; $modules = array(); // If we're not coming from the confirmation form, build the list of modules. - if (!isset($form_state['storage']['modules'])) { + if (empty($form_state['storage'])) { foreach ($form_state['values']['modules'] as $group_name => $group) { foreach ($group as $module => $enabled) { $modules[$module] = array('group' => $group_name, 'enabled' => $enabled['enable']); @@ -1009,10 +1009,6 @@ function system_modules_submit($form, &$form_state) { } } } - // Now we have installed every module as required (either by the user or - // because other modules require them) so we don't need the temporary - // storage anymore. - unset($form_state['storage']); $old_module_list = module_list(); @@ -1096,7 +1092,7 @@ function system_modules_uninstall($form, $form_state = NULL) { include_once DRUPAL_ROOT . '/includes/install.inc'; // Display the confirm form if any modules have been submitted. - if (isset($form_state) && $confirm_form = system_modules_uninstall_confirm_form($form_state['storage'])) { + if (!empty($form_state) && $confirm_form = system_modules_uninstall_confirm_form($form_state['storage'])) { return $confirm_form; } @@ -1146,7 +1142,7 @@ function system_modules_uninstall($form, $form_state = NULL) { */ function system_modules_uninstall_confirm_form($storage) { // Nothing to build. - if (!isset($storage, $storage['uninstall'])) { + if (empty($storage)) { return; } @@ -1199,7 +1195,6 @@ function system_modules_uninstall_submit($form, &$form_state) { drupal_uninstall_modules($modules); drupal_set_message(t('The selected modules have been uninstalled.')); - unset($form_state['storage']); $form_state['redirect'] = 'admin/config/modules/uninstall'; } else { |