summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2002-11-29 05:45:57 +0000
committerDries Buytaert <dries@buytaert.net>2002-11-29 05:45:57 +0000
commit6c862208d82eb0cbbd4fa5355c612ff647978474 (patch)
tree435cdb2530307c39afc31ae1c0c7acd2fafefd89 /includes/common.inc
parente2869ecafe0d42d4450dbf0ec6b4c590badc8cf3 (diff)
downloadbrdo-6c862208d82eb0cbbd4fa5355c612ff647978474.tar.gz
brdo-6c862208d82eb0cbbd4fa5355c612ff647978474.tar.bz2
- Fixed small glitch in drupal_goto(): somethimes a "&" got appended. Patch
by Marco.
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc18
1 files changed, 9 insertions, 9 deletions
diff --git a/includes/common.inc b/includes/common.inc
index f4104aaed..7e5715dee 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -314,18 +314,18 @@ function drupal_goto($url) {
** is compiled with "--enable-trans-sid".
*/
- if (ini_get("session.use_trans_sid")) {
- $sid = session_name() . "=" . session_id();
- }
-
- if (!session_id() || strstr($url, $sid)) {
+ if (!ini_get("session.use_trans_sid") || !session_id() || strstr($url, $sid)) {
header("Location: $url");
}
- else if (strstr($url, "?") && !strstr($url, $sid)) {
- header("Location: $url&". $sid);
- }
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);
+ }
}
/*