update_fetch_data_finished

7 update.fetch.inc update_fetch_data_finished($success, $results)
8 update.fetch.inc update_fetch_data_finished($success, $results)

Batch API callback when all fetch tasks have been completed.

Parameters

$success: Boolean indicating the success of the batch.

$results: Associative array holding the results of the batch, including the key 'updated' which holds the total number of projects we fetched available update data for.

1 string reference to 'update_fetch_data_finished'

File

modules/update/update.fetch.inc, line 82
Code required only when fetching information about available updates.

Code

function update_fetch_data_finished($success, $results) {
  if ($success) {
    if (!empty($results)) {
      if (!empty($results['updated'])) {
        drupal_set_message(format_plural($results['updated'], 'Checked available update data for one project.', 'Checked available update data for @count projects.'));
      }
      if (!empty($results['failures'])) {
        drupal_set_message(format_plural($results['failures'], 'Failed to get available update data for one project.', 'Failed to get available update data for @count projects.'), 'error');
      }
    }
  }
  else {
    drupal_set_message(t('An error occurred trying to get available update data.'), 'error');
  }
}
Login or register to post comments