You are here

function globalredirect_is_cli in Global Redirect 6

Drupal 6 backport of drupal_is_cli().

1 call to globalredirect_is_cli()
_globalredirect_is_active in ./globalredirect.module
Internal function to determine if GlobalRedirect is active. Several rules have to be checked prior to execution, such as an empty post array, the site must be online and we cannot be running in CLI mode (eg Drush).

File

./globalredirect.module, line 273
The Global Redirect module redirects for all paths which have aliases but are not using the aliases which reduces the risk of duplicate content.

Code

function globalredirect_is_cli() {
  return !isset($_SERVER['SERVER_SOFTWARE']) && (PHP_SAPI == 'cli' || is_numeric($_SERVER['argc']) && $_SERVER['argc'] > 0);
}