You are here

function lti_tool_provider_goto in LTI Tool Provider 7

Perform a drupal goto but avoid interfering with cron.php.

3 calls to lti_tool_provider_goto()
lti_tool_provider_home in ./lti_tool_provider.operations.inc
Menu page callback for the LTI Home menu item.
lti_tool_provider_launch in ./lti_tool_provider.operations.inc
LTI launch.
lti_tool_provider_return in ./lti_tool_provider.operations.inc
Page callback for the lti return menu item.

File

./lti_tool_provider.module, line 617
lti_tool_provider hook implementations and support functions.

Code

function lti_tool_provider_goto($path) {
  if (php_sapi_name() == 'cli') {

    // This may mean cron via Drush.
    drupal_exit();
  }
  if (preg_match('/\\/cron.php$/', $_SERVER['SCRIPT_NAME'])) {

    // Check for cron.php in the url.
    // preg_match accommodates sites in sub-directories.
    drupal_exit();
  }
  if (arg(0) == 'admin' && arg(1) == 'reports' && arg(2) == 'status' && arg(3) == 'run-cron') {
    drupal_exit();
  }
  drupal_goto($path);
}