function _update_authorize_clear_update_status

Same name in other branches
  1. 7.x modules/update/update.authorize.inc \_update_authorize_clear_update_status()
  2. 9 core/modules/update/update.authorize.inc \_update_authorize_clear_update_status()
  3. 8.9.x core/modules/update/update.authorize.inc \_update_authorize_clear_update_status()
  4. 10 core/modules/update/update.authorize.inc \_update_authorize_clear_update_status()

Clears available update status data.

Since this function is run at such a low bootstrap level, the Update Manager module is not loaded. So, we can't just call update_storage_clear(). However, the key-value backend is available, so we just call that.

Note that we do not want to delete items related to currently pending fetch attempts.

See also

update_authorize_update_batch_finished()

update_storage_clear()

1 call to _update_authorize_clear_update_status()
update_authorize_update_batch_finished in core/modules/update/update.authorize.inc
Batch callback: Performs actions when the authorized update batch is done.

File

core/modules/update/update.authorize.inc, line 251

Code

function _update_authorize_clear_update_status() {
    \Drupal::keyValueExpirable('update')->deleteAll();
    \Drupal::keyValueExpirable('update_available_release')->deleteAll();
}

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