function civicrm_cron_get_url in CiviCRM Cron 7
Same name and namespace in other branches
- 6 civicrm_cron.module \civicrm_cron_get_url()
2 calls to civicrm_cron_get_url()
- civicrm_cron_admin_settings in ./
civicrm_cron.module - Builds the civicrm_cron admininstration settings form.
- civicrm_cron_cron in ./
civicrm_cron.module - Implementation of hook_cron().
File
- ./
civicrm_cron.module, line 78 - CiviCRM Cron Module
Code
function civicrm_cron_get_url($cron_values) {
if ($cron_values['name'] && $cron_values['pass'] && $cron_values['key']) {
global $base_url;
$civicrm_path = drupal_get_path('module', 'civicrm');
//remove the last occurrence of 'drupal' from path
$pos = strrpos($civicrm_path, 'drupal');
if ($pos !== false) {
$civicrm_path = substr_replace($civicrm_path, '', $pos, strlen($civicrm_path));
}
$url = $civicrm_path . 'bin/cron.php';
return $base_url . url($url, array(
'query' => $cron_values,
));
}
return FALSE;
}