Commit b8c815d2 authored by Dries's avatar Dries

- An attempt to solve drupal_goto() in presence of session IDs.
parent c3e91ce8
......@@ -305,6 +305,7 @@ function drupal_goto($url) {
/*
** Translate & to simply &
*/
$url = str_replace ("&", "&", $url);
/*
......@@ -313,14 +314,16 @@ function drupal_goto($url) {
** is compiled with "--enable-trans-sid".
*/
if (SID == "" || strstr($url, SID)) {
$sid = session_name() . "=" . session_id();
if (!session_id() || strstr($url, $sid)) {
header("Location: $url");
}
else if (strstr($url, "?") && !strstr($url, SID)) {
header("Location: $url&". SID);
else if (strstr($url, "?") && !strstr($url, $sid)) {
header("Location: $url&". $sid);
}
else {
header("Location: $url?". SID);
header("Location: $url?". $sid);
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment