aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorJason Oster <parasytic@users.sourceforge.net>2010-01-12 19:33:41 +0000
committerJason Oster <parasytic@users.sourceforge.net>2010-01-12 19:33:41 +0000
commitdca6824e4f8973d32156829514871145d73bed39 (patch)
tree43d0e6686708d6225edf99fbd2603faad5752d2a /functions
parentb7d6d1d72222686975862269069763819bbfdb6d (diff)
downloadphpicalendar-dca6824e4f8973d32156829514871145d73bed39.tar.gz
phpicalendar-dca6824e4f8973d32156829514871145d73bed39.tar.bz2
phpicalendar-dca6824e4f8973d32156829514871145d73bed39.zip
Fix repeating ampersands at the end of the URL on log in/log out. Fix use of
Diffstat (limited to 'functions')
-rw-r--r--functions/userauth_functions.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/functions/userauth_functions.php b/functions/userauth_functions.php
index b9204bc..b8abacb 100644
--- a/functions/userauth_functions.php
+++ b/functions/userauth_functions.php
@@ -7,7 +7,7 @@ function login_querys() {
$querys = preg_replace('/(username|password|action)=[^&]+/', '', $_SERVER['QUERY_STRING']);
// Return the login query string.
- $querys = preg_replace('/&&/', '', $querys);
+ $querys = preg_replace('/&&|&$/', '', $querys);
return $querys;
}
@@ -17,13 +17,13 @@ function login_querys() {
function logout_querys() {
// Make sure the action is logout.
$querys = preg_replace('/action=[^&]+/', 'action=logout', $_SERVER['QUERY_STRING']);
- if ($querys == $QUERY_STRING) $querys .= '&action=logout';
+ if ($querys == $_SERVER['QUERY_STRING']) $querys .= '&action=logout';
// Remove references to the username or password.
$querys = preg_replace('/(username|password)=[^&]+/', '', $querys);
// Return the logout query string.
- $querys = preg_replace('/&&/', '', $querys);
+ $querys = preg_replace('/&&|&$/', '', $querys);
return $querys;
}

© 2014-2022 Faster IT GmbH | imprint | privacy policy