Commit 2af6e14d95a2fd57db692fa854137bc3f7eade29

Authored by Michael Joseph
1 parent 20446851

fixes to querystring handling


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@741 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 3 additions and 2 deletions
lib/session/control.inc
@@ -31,11 +31,13 @@ function redirect($url) { @@ -31,11 +31,13 @@ function redirect($url) {
31 * @param string additional querystring vars 31 * @param string additional querystring vars
32 */ 32 */
33 function controllerRedirect($action, $queryString) { 33 function controllerRedirect($action, $queryString) {
  34 + global $default;
34 // generate url 35 // generate url
35 $ctlUrl = generateControllerUrl($action); 36 $ctlUrl = generateControllerUrl($action);
36 // append the rest of the url 37 // append the rest of the url
37 $url = $ctlUrl . "&$queryString"; 38 $url = $ctlUrl . "&$queryString";
38 // now redirect 39 // now redirect
  40 + $default->log->debug("controllerRedirect: redirect to $url");
39 redirect($url); 41 redirect($url);
40 } 42 }
41 43
@@ -77,8 +79,7 @@ function checkSessionAndRedirect($bRedirect) { @@ -77,8 +79,7 @@ function checkSessionAndRedirect($bRedirect) {
77 // verification failed, redirect to login with error message 79 // verification failed, redirect to login with error message
78 $default->log->debug("checkSession:: session check failed"); 80 $default->log->debug("checkSession:: session check failed");
79 $url = $default->owl_root_url . "/control.php?action=loginForm"; 81 $url = $default->owl_root_url . "/control.php?action=loginForm";
80 -  
81 - $redirect = urlencode($_SERVER[PHP_SELF]); 82 + $redirect = urlencode($_SERVER[PHP_SELF] . "?" . $_SERVER["QUERY_STRING"]);
82 if ((strlen($redirect) > 1)) { 83 if ((strlen($redirect) > 1)) {
83 $default->log->debug("checkSession:: redirect url=$redirect"); 84 $default->log->debug("checkSession:: redirect url=$redirect");
84 // this session verification failure represents either the first visit to 85 // this session verification failure represents either the first visit to