summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-09-30 21:13:14 +0000
committerDries Buytaert <dries@buytaert.net>2001-09-30 21:13:14 +0000
commit3f91d675c7d999a9c5af563231d4e2b0b7071b88 (patch)
treec257bfeddc4e5773fb11481a01b871df595e8408
parent6ce32718eb24ca5bde37c4e1e3deee4001f346ba (diff)
downloadbrdo-3f91d675c7d999a9c5af563231d4e2b0b7071b88.tar.gz
brdo-3f91d675c7d999a9c5af563231d4e2b0b7071b88.tar.bz2
- small improvement to 'drupal_goto()'
-rw-r--r--includes/common.inc11
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 {