Issue #2014037 by hussainweb, kgoel: Replace drupal_container() with Drupal::keyValue() in the update module.

8.0.x
Alex Pott 2013-06-18 14:14:27 +02:00
parent 6c5cc0c281
commit fc35679d72
1 changed files with 3 additions and 3 deletions

View File

@ -193,7 +193,7 @@ function _update_process_fetch_task($project) {
// Now that we processed the fetch task for this project, clear out the
// record for this task so we're willing to fetch again.
drupal_container()->get('keyvalue')->get('update_fetch_task')->delete($project_name);
Drupal::keyValue('update_fetch_task')->delete($project_name);
return $success;
}
@ -245,12 +245,12 @@ function _update_refresh() {
function _update_create_fetch_task($project) {
$fetch_tasks = &drupal_static(__FUNCTION__, array());
if (empty($fetch_tasks)) {
$fetch_tasks = drupal_container()->get('keyvalue')->get('update_fetch_task')->getAll();
$fetch_tasks = Drupal::keyValue('update_fetch_task')->getAll();
}
if (empty($fetch_tasks[$project['name']])) {
$queue = Drupal::queue('update_fetch_tasks');
$queue->createItem($project);
drupal_container()->get('keyvalue')->get('update_fetch_task')->set($project['name'], $project);
Drupal::keyValue('update_fetch_task')->set($project['name'], $project);
$fetch_tasks[$project['name']] = REQUEST_TIME;
}
}