You are here

function deploy_auto_plan_get_session in Deploy - Content Staging 7.2

Same name and namespace in other branches
  1. 7.3 modules/deploy_auto_plan/deploy_auto_plan.module \deploy_auto_plan_get_session()

Helper function to get a session value

Return value

string|FALSE The plan name or FALSE when not exist in session

2 calls to deploy_auto_plan_get_session()
DeployAdhocPlanTestCase::testDeployment in modules/deploy_adhoc_plan/deploy_adhoc_plan.test
deploy_auto_plan_get_plan in modules/deploy_auto_plan/deploy_auto_plan.module
Helper function to get a plan name

File

modules/deploy_auto_plan/deploy_auto_plan.module, line 46
Deploy Auto Plan module functions.

Code

function deploy_auto_plan_get_session() {

  // Don't ask why, or see explanation in deploy_auto_plan_set_session() if you
  // really want to know why (but you don't, trust me).
  $test_info =& $GLOBALS['drupal_test_info'];
  if ($test_info) {
    return variable_get('deploy_auto_plan_user_plan__testing', FALSE);
  }
  if (isset($_SESSION['deploy_auto_plan_user_plan'])) {
    return $_SESSION['deploy_auto_plan_user_plan'];
  }
  return FALSE;
}