function system_modules_uninstall_submit
7.x system.admin.inc | system_modules_uninstall_submit($form, &$form_state) |
6.x system.admin.inc | system_modules_uninstall_submit($form, &$form_state) |
Processes the submitted uninstall form.
File
- drupal-6.x/
modules/ system/ system.admin.inc, line 1129 - Admin page callbacks for the system module.
Code
function system_modules_uninstall_submit($form, &$form_state) {
// Make sure the install API is available.
include_once './includes/install.inc';
if (!empty($form['#confirmed'])) {
// Call the uninstall routine for each selected module.
foreach (array_filter($form_state['values']['uninstall']) as $module => $value) {
drupal_uninstall_module($module);
}
drupal_set_message(t('The selected modules have been uninstalled.'));
unset($form_state['storage']);
$form_state['redirect'] = 'admin/build/modules/uninstall';
}
else {
$form_state['storage'] = $form_state['values'];
}
}