You are here

function elysia_cron_drush_detect in Elysia Cron 7.2

Same name and namespace in other branches
  1. 6.2 elysia_cron.drush.inc \elysia_cron_drush_detect()

Detect, is it drush or not.

Return value

bool TRUE if code executed inside drush, FALSE otherwise.

1 call to elysia_cron_drush_detect()
elysia_cron_cron in ./elysia_cron.module
Implements hook_cron().
1 string reference to 'elysia_cron_drush_detect'
elysia_cron_cron in ./elysia_cron.module
Implements hook_cron().

File

./elysia_cron.drush.inc, line 14
Drush integration for Elysia cron module.

Code

function elysia_cron_drush_detect() {
  return !isset($_SERVER['SERVER_SOFTWARE']) && (php_sapi_name() == 'cli' || is_numeric($_SERVER['argc']) && $_SERVER['argc'] > 0) && function_exists('drush_main');
}