diff options
-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 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 { |