1 installer.manager.inc installer_manager_download_batch_finished($success, $results)

Batch callback: Performs actions when the download batch is completed.

Parameters

$success: TRUE if the batch operation was successful, FALSE if there were errors.

$results: An associative array of results from the batch operation.

Related topics

File

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

Code

function installer_manager_download_batch_finished($success, $results) {
  if (!empty($results['errors'])) {
    $error_list = array(
      'title' => t('Downloading updates failed:'),
      'items' => $results['errors'],
    );
    backdrop_set_message(theme('item_list', $error_list), 'error');
  }
  elseif ($success) {
    backdrop_set_message(t('Updates downloaded successfully.'));
    $_SESSION['installer_manager_update_projects'] = $results['projects'];
    backdrop_goto('admin/update/ready');
  }
  else {
    // Ideally we're catching all Exceptions, so they should never see this,
    // but just in case, we have to tell them something.
    backdrop_set_message(t('Fatal error trying to download.'), 'error');
  }
}