You are here

function apps_profile_download_batch_finished in Apps 7

Batch callback invoked when the download batch is completed.

This is a copy of update_manager_download_batch_finished without the goto which messes up the batch during install.

1 string reference to 'apps_profile_download_batch_finished'
apps_profile_download_app_modules in ./apps.profile.inc
Batch process apps download.

File

./apps.profile.inc, line 282
The install functions for the Apps module.

Code

function apps_profile_download_batch_finished($success, $results) {
  if (!empty($results['errors'])) {
    $error_list = array(
      'title' => t('Downloading updates failed:'),
      'items' => $results['errors'],
    );

    // @ignore security_2
    drupal_set_message(theme('item_list', $error_list), 'error');
  }
  elseif ($success) {
    drupal_set_message(t('Updates downloaded successfully.'));
    $_SESSION['update_manager_update_projects'] = isset($results['projects']) ? $results['projects'] : NULL;
  }
  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');
  }
}