function update_fetch_data_finished

Same name in other branches
  1. 9 core/modules/update/update.module \update_fetch_data_finished()
  2. 8.9.x core/modules/update/update.module \update_fetch_data_finished()
  3. 10 core/modules/update/update.module \update_fetch_data_finished()
  4. 11.x core/modules/update/update.module \update_fetch_data_finished()

Implements callback_batch_finished().

Performs actions when all fetch tasks have been 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, 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'
update_manual_status in modules/update/update.fetch.inc
Page callback: Checks for updates and displays the update status report.

File

modules/update/update.fetch.inc, line 93

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');
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.