From 3f91d675c7d999a9c5af563231d4e2b0b7071b88 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 30 Sep 2001 21:13:14 +0000 Subject: - small improvement to 'drupal_goto()' --- includes/common.inc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index e441b3f30..822ac0a1b 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -72,14 +72,17 @@ function message_throttle() { } function drupal_goto($url) { - + /* - ** It is advised to use "drupal_goto()" instead of PHP's "header()" as - ** "drupal_goto()" will append the user's session ID to the URI when PHP + ** It is advised to use "drupal_goto()" instead of PHP's "header()" as + ** "drupal_goto()" will append the user's session ID to the URI when PHP ** is compiled with "--enable-trans-sid". */ - if (strstr($url, "?")) { + if (SID == "" || strstr($url, SID)) { + header("Location: $url"); + } + else if (strstr($url, "?") && !strstr($url, SID)) { header("Location: $url&". SID); } else { -- cgit v1.2.3