diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-09-30 21:13:14 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-09-30 21:13:14 +0000 |
commit | 3f91d675c7d999a9c5af563231d4e2b0b7071b88 (patch) | |
tree | c257bfeddc4e5773fb11481a01b871df595e8408 /includes/common.inc | |
parent | 6ce32718eb24ca5bde37c4e1e3deee4001f346ba (diff) | |
download | brdo-3f91d675c7d999a9c5af563231d4e2b0b7071b88.tar.gz brdo-3f91d675c7d999a9c5af563231d4e2b0b7071b88.tar.bz2 |
- small improvement to 'drupal_goto()'
Diffstat (limited to 'includes/common.inc')
-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 { |