Commit 818a885c9caabf9c39b30d29e06046024aa7bdb2
1 parent
e8eaa15d
remove querystring params before stripping off owl_root_url
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@753 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
9 additions
and
8 deletions
presentation/login.php
| @@ -74,20 +74,21 @@ if ($loginAction == "loginForm") { | @@ -74,20 +74,21 @@ if ($loginAction == "loginForm") { | ||
| 74 | 74 | ||
| 75 | // check for a location to forward to | 75 | // check for a location to forward to |
| 76 | if (isset($redirect) && strlen(trim($redirect))>0) { | 76 | if (isset($redirect) && strlen(trim($redirect))>0) { |
| 77 | - // need to strip owl_root_url off $redirect | ||
| 78 | - if (strlen($default->owl_root_url) > 0) { | ||
| 79 | - $tmp = urldecode($redirect); | ||
| 80 | - $default->log->debug("login.php: substr($tmp, strpos($tmp, $default->owl_root_url), strlen($tmp))"); | ||
| 81 | - $redirect = substr($tmp, strpos($tmp, $default->owl_root_url), strlen($tmp)); | ||
| 82 | - $default->log->debug("login.php: redirect=$redirect"); | ||
| 83 | - } | ||
| 84 | - | ||
| 85 | // remove any params from redirect before looking up from sitemap | 77 | // remove any params from redirect before looking up from sitemap |
| 86 | if (strstr($redirect, "?")) { | 78 | if (strstr($redirect, "?")) { |
| 87 | $queryString = substr($redirect, strpos($redirect, "?")+1, strlen($redirect)); | 79 | $queryString = substr($redirect, strpos($redirect, "?")+1, strlen($redirect)); |
| 88 | $redirect = substr($redirect, 0, strpos($redirect, "?")); | 80 | $redirect = substr($redirect, 0, strpos($redirect, "?")); |
| 89 | $default->log->debug("login.php redirect=$redirect; querystring=$queryString"); | 81 | $default->log->debug("login.php redirect=$redirect; querystring=$queryString"); |
| 90 | } | 82 | } |
| 83 | + | ||
| 84 | + // need to strip owl_root_url off $redirect | ||
| 85 | + if (strlen($default->owl_root_url) > 0) { | ||
| 86 | + $tmp = urldecode($redirect); | ||
| 87 | + $default->log->debug("login.php: substr($tmp, strpos($tmp, $default->owl_root_url), strlen($tmp))"); | ||
| 88 | + $redirect = substr($tmp, strpos($tmp, $default->owl_root_url), strlen($tmp)); | ||
| 89 | + $default->log->debug("login.php: redirect=$redirect"); | ||
| 90 | + } | ||
| 91 | + | ||
| 91 | $url = generateControllerUrl($default->siteMap->getActionFromPage($redirect)); | 92 | $url = generateControllerUrl($default->siteMap->getActionFromPage($redirect)); |
| 92 | // else redirect to the dashboard | 93 | // else redirect to the dashboard |
| 93 | } else { | 94 | } else { |