function _prod_check_module_list in Production check & Production monitor 7
Same name and namespace in other branches
- 6 prod_check.module \_prod_check_module_list()
File
- ./prod_check.module, line 2024
Code
function _prod_check_module_list($caller = 'internal') {
global $base_url;
$check = array();
$now = REQUEST_TIME;
$last = variable_get('prod_check_module_list_lastrun', 0);
if (variable_get('prod_check_module_list_day', 0) == date('w', $now) || $last == -1) {
if (date('Ymd', $last) != date('Ymd', $now)) {
$time = explode(':', variable_get('prod_check_module_list_time', '03:00'));
if (date('H', $now) >= $time[0] && date('i', $now) >= $time[1]) {
module_load_include('inc', 'prod_check', 'includes/prod_check.update');
$projects = array();
_prod_check_process_info_list($projects, system_rebuild_module_data(), 'module', TRUE);
_prod_check_process_info_list($projects, system_rebuild_theme_data(), 'theme', TRUE);
_prod_check_process_info_list($projects, system_rebuild_module_data(), 'module', FALSE);
_prod_check_process_info_list($projects, system_rebuild_theme_data(), 'theme', FALSE);
drupal_alter('update_projects', $projects);
$check['prod_check_module_list']['projects'] = $projects;
$check['prod_check_module_list']['site_key'] = drupal_hmac_base64($base_url, drupal_get_private_key());
$check['prod_check_module_list']['last_update'] = $now;
variable_set('prod_check_module_list_lastrun', $now);
}
}
}
return prod_check_execute_check($check, $caller, 'prod_mon');
}