function _update_get_cached_available_releases

_update_get_cached_available_releases()

Returns all currently cached data about available releases for all projects.

Return value

Array of data about available releases, keyed by project shortname.

File

modules/update/update.module, line 488
Handles updates of Drupal core and contributed projects.

Code

function _update_get_cached_available_releases() {
  $data = array();
  $cache_items = _update_get_cache_multiple('available_releases');
  foreach ($cache_items as $cid => $cache) {
    $cache->data['last_fetch'] = $cache->created;
    if ($cache->expire < REQUEST_TIME) {
      $cache->data['fetch_status'] = UPDATE_FETCH_PENDING;
    }
    // The project shortname is embedded in the cache ID, even if there's no
    // data for this project in the DB at all, so use that for the indexes in
    // the array.
    $parts = explode('::', $cid, 2);
    $data[$parts[1]] = $cache->data;
  }
  return $data;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!update!update.module/function/_update_get_cached_available_releases/7.x