system_modules_uninstall_submit

Versions
5
system_modules_uninstall_submit($form_id, $form_values)
6 – 7
system_modules_uninstall_submit($form, &$form_state)

Processes the submitted uninstall form.

Code

modules/system/system.admin.inc, line 1107

<?php
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'];
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.