Commit c7245b00 authored by alexpott's avatar alexpott
Browse files

Issue #2384009 by arpitr: Remove deprecated function _update_create_fetch_task and its usage

parent 88307ff8
......@@ -314,7 +314,6 @@ function testFetchTasks() {
// Clear storage and try again.
update_storage_clear();
drupal_static_reset('_update_create_fetch_task');
update_create_fetch_task($projecta);
$this->assertEqual($queue->numberOfItems(), 2, 'Queue contains two items');
}
......
......@@ -29,26 +29,6 @@ function _update_refresh() {
\Drupal::service('update.manager')->refreshUpdateData();
}
/**
* Adds a task to the queue for fetching release history data for a project.
*
* We only create a new fetch task if there's no task already in the queue for
* this particular project (based on 'update_fetch_task' key-value collection).
*
* @param $project
* Associative array of information about a project as created by
* update_get_projects(), including keys such as 'name' (short name), and the
* 'info' array with data from a .info.yml file for the project.
*
* @see \Drupal\update\UpdateFetcher::createFetchTask()
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal::service('update.processor')->createFetchTask().
*/
function _update_create_fetch_task($project) {
\Drupal::service('update.processor')->createFetchTask($project);
}
/**
* Performs any notifications that should be done once cron fetches new data.
*
......
......@@ -368,17 +368,21 @@ function update_get_available($refresh = FALSE) {
}
/**
* Creates a new fetch task after loading the necessary include file.
* Adds a task to the queue for fetching release history data for a project.
*
* We only create a new fetch task if there's no task already in the queue for
* this particular project (based on 'update_fetch_task' key-value collection).
*
* @param $project
* Associative array of information about a project. See update_get_projects()
* for the keys used.
* Associative array of information about a project as created by
* update_get_projects(), including keys such as 'name' (short name), and the
* 'info' array with data from a .info.yml file for the project.
*
* @see \Drupal\update\UpdateFetcher::createFetchTask()
*
* @see _update_create_fetch_task()
*/
function update_create_fetch_task($project) {
module_load_include('inc', 'update', 'update.fetch');
_update_create_fetch_task($project);
\Drupal::service('update.processor')->createFetchTask($project);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment