update_manager_download_batch_finished

Versions
7
update_manager_download_batch_finished($success, $results)

Batch callback invoked when the download batch is completed.

Related topics

Code

modules/update/update.manager.inc, line 325

<?php
function update_manager_download_batch_finished($success, $results) {
  if (!empty($results['errors'])) {
    $error_list = array(
      'title' => t('Downloading updates failed:'),
      'items' => $results['errors'],
    );
    drupal_set_message(theme('item_list', $error_list), 'error');
  }
  elseif ($success) {
    $_SESSION['update_manager_update_projects'] = $results['projects'];
    drupal_goto('admin/update/confirm');
  }
  else {
    // Ideally we're catching all Exceptions, so they should never see this,
    // but just in case, we have to tell them something.
    drupal_set_message(t('Fatal error trying to download.'), 'error');
  }
}
?>
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.