function fp_goto

6.x misc.inc fp_goto($path, $query = "")
4.x misc.inc fp_goto($path, $query = "")
5.x misc.inc fp_goto($path, $query = "")

Redirect the user's browser to the specified internal path + query.

We will automatically add the current_student_id variable, if it is not present in the query.

Example uses:

25 calls to fp_goto()
admin_edit_group_form_submit in modules/admin/admin.groups.inc
admin_handle_edit_degree_submit in modules/admin/admin.degrees.inc
advise_init_screen in modules/advise/advise.module
advise_perform_clear_advising_cache in modules/advise/advise.module
From menu hook. Clear just the advising cache.
blank_degrees_select_degree_form_submit in modules/blank_degrees/blank_degrees.module
Submit handler for degree selection

... See full list

File

includes/misc.inc, line 948
This file contains misc functions for FlightPath

Code

function fp_goto($path, $query = "") {
  global $current_student_id;

  if ($current_student_id != "" && !strstr($query, "current_student_id=")) {
    // If the query doesn't contain the current_student_id, then add it in.
    $query .= "&current_student_id=$current_student_id";
  }

  // Close the seesion before we try to redirect.
  session_write_close();

  if ($path == "<front>") {
    $path = variable_get("front_page", "main");
  }


  header('Location: ' . fp_url($path, $query));
  exit();

}