- Fixed small glitch in drupal_goto(): somethimes a "&" got appended. Patch

by Marco.
4.1.x
Dries Buytaert 2002-11-29 05:45:57 +00:00
parent e2869ecafe
commit 6c862208d8
1 changed files with 9 additions and 9 deletions

View File

@ -314,18 +314,18 @@ function drupal_goto($url) {
** is compiled with "--enable-trans-sid". ** is compiled with "--enable-trans-sid".
*/ */
if (ini_get("session.use_trans_sid")) { if (!ini_get("session.use_trans_sid") || !session_id() || strstr($url, $sid)) {
$sid = session_name() . "=" . session_id();
}
if (!session_id() || strstr($url, $sid)) {
header("Location: $url"); header("Location: $url");
} }
else if (strstr($url, "?") && !strstr($url, $sid)) {
header("Location: $url&". $sid);
}
else { else {
header("Location: $url?". $sid); $sid = session_name() . "=" . session_id();
if (strstr($url, "?") && !strstr($url, $sid)) {
header("Location: $url&". $sid);
}
else {
header("Location: $url?". $sid);
}
} }
/* /*