1 installer.manager.inc installer_manager_update_form_submit($form, &$form_state)

Form submission handler for installer_manager_update_form().

Sets up a batch that downloads, extracts, and verifies the selected releases.

See also

installer_manager_update_form_validate()

Related topics

File

core/modules/installer/installer.manager.inc, line 319
Administrative screens and processing functions of the Installer module.

Code

function installer_manager_update_form_submit($form, &$form_state) {
  $projects = array();
  foreach (array('projects', 'disabled_projects') as $type) {
    if (!empty($form_state['values'][$type])) {
      $projects = array_merge($projects, array_keys(array_filter($form_state['values'][$type])));
    }
  }
  $operations = array();
  foreach ($projects as $project) {
    $operations[] = array(
      'installer_manager_batch_project_get',
      array(
        $project,
        $form_state['values']['project_downloads'][$project],
      ),
    );
  }
  $batch = array(
    'title' => t('Downloading updates'),
    'init_message' => t('Preparing to download selected updates'),
    'operations' => $operations,
    'finished' => 'installer_manager_download_batch_finished',
    'file' => backdrop_get_path('module', 'installer') . '/installer.manager.inc',
  );
  batch_set($batch);
}