function background_process_init in Background Process 6
Same name and namespace in other branches
- 8 background_process.module \background_process_init()
- 7 background_process.module \background_process_init()
Implements hook_init().
File
- ./
background_process.module, line 321
Code
function background_process_init() {
// Only determine if we're told to do so
if (empty($_SESSION['background_process_determine_default_service_host'])) {
return;
}
// Don't determine on check-token page, to avoid infinite loop
if (strpos($_GET['q'], 'background-process/check-token') === 0) {
return;
}
// Only determine when installation of site is finished
if (variable_get('install_task', FALSE) != 'done') {
return;
}
// Determine the default service host
background_process_determine_and_save_default_service_host();
unset($_SESSION['background_process_determine_default_service_host']);
}