You are here

function upgrade_status_get_available in Upgrade Status 5

Same name and namespace in other branches
  1. 6 upgrade_status.module \upgrade_status_get_available()
  2. 7 upgrade_status.module \upgrade_status_get_available()

Internal helper to try to get the update information from the cache if possible, and to refresh the cache when necessary.

Parameters

$refresh: Boolean to indicate if this method should refresh the cache automatically if there's no data.

1 call to upgrade_status_get_available()
_upgrade_status_status in ./upgrade_status.admin.inc
Menu callback. Generate a page about the upgrade status of projects.

File

./upgrade_status.admin.inc, line 645
Checks to see if your installed modules are available for the next major release of Drupal.

Code

function upgrade_status_get_available($refresh = FALSE) {
  $available = array();
  if (!$refresh && ($cache = cache_get('upgrade_status_info', 'cache'))) {
    $available = unserialize($cache->data);
  }
  else {
    $available = upgrade_status_refresh();
  }
  return $available;
}