_update_refresh

Versions
6 – 7
_update_refresh()

Clear out all the cached available update data and initiate re-fetching.

▾ 2 functions call _update_refresh()

update_manual_status in modules/update/update.fetch.inc
Callback to manually check the update status without cron.
update_refresh in modules/update/update.module
Wrapper to load the include file and then refresh the release data.

Code

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

<?php
function _update_refresh() {
  module_load_include('inc', 'update', 'update.compare');

  // Since we're fetching new available update data, we want to clear
  // our cache of both the projects we care about, and the current update
  // status of the site. We do *not* want to clear the cache of available
  // releases just yet, since that data (even if it's stale) can be useful
  // during update_get_projects(); for example, to modules that implement
  // hook_system_info_alter() such as cvs_deploy.
  _update_cache_clear('update_project_projects');
  _update_cache_clear('update_project_data');

  $projects = update_get_projects();

  // Now that we have the list of projects, we should also clear our cache of
  // available release data, since even if we fail to fetch new data, we need
  // to clear out the stale data at this point.
  _update_cache_clear('available_releases::', TRUE);

  foreach ($projects as $key => $project) {
    update_create_fetch_task($project);
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.