You are here

function _nagios_update_calculate_project_data in Nagios Monitoring 7

Wrapper function to ensure update_calculate_project_data() can always be accessed, even if the core update module is disabled.

Return value

array An array of installed projects with current update status information.

1 call to _nagios_update_calculate_project_data()
nagios_check_requirements in ./nagios.module
Check all Drupal requirements are satisfied.

File

./nagios.module, line 1360

Code

function _nagios_update_calculate_project_data($available = []) {
  if (!module_exists('update')) {

    // update_calculate_project_data() relies on the update module to have been installed, not just the code to be available
    if (db_table_exists('cache_update')) {
      module_load_include('inc', 'update', 'update.compare');
      return update_calculate_project_data($available);
    }
    watchdog('nagios', t('The core update module was never installed so we cannot use update check features.'));
  }
  else {
    return update_calculate_project_data($available);
  }
  return [];
}