| 7 update.manager.inc | update_manager_update_form_submit($form, &$form_state) |
| 8 update.manager.inc | update_manager_update_form_submit($form, &$form_state) |
Submit function for the main update form.
This sets up a batch to download, extract and verify the selected releases
See also
Related topics
File
- modules/
update/ update.manager.inc, line 304 - Administrative screens and processing functions for the update manager. This allows site administrators with the 'administer software updates' permission to either upgrade existing projects, or download and install new ones, so long as the…
Code
function update_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(
'update_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' => 'update_manager_download_batch_finished',
'file' => drupal_get_path('module', 'update') . '/update.manager.inc',
);
batch_set($batch);
}
Login or register to post comments