1 system.admin.inc system_modules_uninstall_submit($form, &$form_state)

Processes the submitted uninstall form.

File

core/modules/system/system.admin.inc, line 1213
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 BACKDROP_ROOT . '/core/includes/install.inc';

  if (!empty($form['#confirmed'])) {
    // Call the uninstall routine for each selected module.
    $modules = array_keys($form_state['values']['uninstall']);
    backdrop_uninstall_modules($modules);
    backdrop_set_message(t('The selected modules have been uninstalled.'));

    $form_state['redirect'] = 'admin/modules/uninstall';
  }
  else {
    $form_state['storage'] = $form_state['values'];
    $form_state['rebuild'] = TRUE;
  }
}