Commit ad545f82d71c127000b1acd242adb0bcbb91690a

Authored by michael
1 parent e6549f92

corrected redirect code


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1636 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 2 additions and 5 deletions
presentation/login.php
@@ -75,19 +75,16 @@ elseif ($loginAction == "login") { @@ -75,19 +75,16 @@ elseif ($loginAction == "login") {
75 75
76 // check for a location to forward to 76 // check for a location to forward to
77 if (isset($redirect) && strlen(trim($redirect))>0) { 77 if (isset($redirect) && strlen(trim($redirect))>0) {
  78 + $redirect = urldecode($redirect);
78 // remove any params from redirect before looking up from sitemap 79 // remove any params from redirect before looking up from sitemap
79 if (strstr($redirect, "?")) { 80 if (strstr($redirect, "?")) {
80 $queryString = substr($redirect, strpos($redirect, "?")+1, strlen($redirect)); 81 $queryString = substr($redirect, strpos($redirect, "?")+1, strlen($redirect));
81 $redirect = substr($redirect, 0, strpos($redirect, "?")); 82 $redirect = substr($redirect, 0, strpos($redirect, "?"));
82 - $default->log->debug("login.php redirect=$redirect; querystring=$queryString");  
83 } 83 }
84 84
85 // need to strip rootUrl off $redirect 85 // need to strip rootUrl off $redirect
86 if (strlen($default->rootUrl) > 0) { 86 if (strlen($default->rootUrl) > 0) {
87 - $tmp = urldecode($redirect);  
88 - $default->log->debug("login.php: substr($tmp, strpos($tmp, $default->rootUrl)+strlen($default->rootUrl), strlen($tmp))");  
89 - $redirect = substr($tmp, strpos($tmp, $default->rootUrl)+strlen($default->rootUrl), strlen($tmp));  
90 - $default->log->debug("login.php: redirect=$redirect"); 87 + $redirect = substr($redirect, strpos($redirect, $default->rootUrl)+strlen($default->rootUrl), strlen($redirect));
91 } 88 }
92 $action = $default->siteMap->getActionFromPage($redirect); 89 $action = $default->siteMap->getActionFromPage($redirect);
93 if ($action) { 90 if ($action) {