function ultimate_cron_poorman_capable in Ultimate Cron 7.2
Determines if poormans cron can run on this page.
1 call to ultimate_cron_poorman_capable()
- ultimate_cron_exit in ./
ultimate_cron.poorman.inc - Implements hook_exit().
File
- ./
ultimate_cron.poorman.inc, line 64 - Poormans cron functions.
Code
function ultimate_cron_poorman_capable() {
static $capable;
if (isset($capable)) {
return $capable;
}
if (drupal_is_cli()) {
$capable = FALSE;
}
elseif ($_SERVER['REQUEST_METHOD'] !== 'GET') {
$capable = FALSE;
}
elseif (basename($_SERVER['PHP_SELF']) == 'cron.php') {
$capable = FALSE;
}
elseif (isset($_GET['q']) && preg_match('!system/files/!', $_GET['q'])) {
$capable = FALSE;
}
else {
$capable = TRUE;
}
return $capable;
}