diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-08-08 18:24:53 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-08-08 18:24:53 +0000 |
commit | b8c815d24593b32a6731f51a10476753f25af474 (patch) | |
tree | c0b8138cd5e70b4b3a2f08c765aad3ab3cea5a54 /includes | |
parent | c3e91ce8893e6b5bb65370cf2448ac2a876972c0 (diff) | |
download | brdo-b8c815d24593b32a6731f51a10476753f25af474.tar.gz brdo-b8c815d24593b32a6731f51a10476753f25af474.tar.bz2 |
- An attempt to solve drupal_goto() in presence of session IDs.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/includes/common.inc b/includes/common.inc index f032ca11a..33e9033a7 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -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); } /* |