function drush_system_modules_form_submit

8.0.x environment_6.inc drush_system_modules_form_submit()
6.x environment_6.inc drush_system_modules_form_submit()
7.x environment_6.inc drush_system_modules_form_submit()
3.x environment_7.inc drush_system_modules_form_submit($active_modules)
3.x environment_6.inc drush_system_modules_form_submit($active_modules)
3.x environment_5.inc drush_system_modules_form_submit($active_modules)
4.x environment_6.inc drush_system_modules_form_submit($active_modules)
4.x environment_5.inc drush_system_modules_form_submit($active_modules)
4.x environment.inc drush_system_modules_form_submit($active_modules)
5.x environment_6.inc drush_system_modules_form_submit()

Submit the system modules form.

The modules should already be fully enabled/disabled before calling this function. Calling this function just makes sure any activities triggered by the form submit (such as admin_role) are completed.

2 calls to drush_system_modules_form_submit()
drush_module_disable in commands/core/drupal/environment_6.inc
Disable a list of modules. It is assumed the list contains all dependents not already disabled.
drush_module_enable in commands/core/drupal/environment_6.inc
Enable a list of modules. It is assumed the list contains all the dependencies not already enabled.

File

commands/core/drupal/environment_6.inc, line 205
Specific functions for a drupal 6 environment. drush_include_engine() magically includes either this file or environment_X.inc depending on which version of drupal drush is called from.

Code

function drush_system_modules_form_submit() {
  $active_modules = array();
  foreach (drush_get_modules(FALSE) as $key => $module) {
    if ($module->status == 1) {
      $active_modules[$key] = $key;
    }
  }
  module_load_include('inc', 'system', 'system.admin');
  $form_state = array('values' => array('status' => $active_modules));
  drupal_execute('system_modules', $form_state);
}