diff --git a/presentation/login.php b/presentation/login.php index 1fe2aed..92bf67d 100644 --- a/presentation/login.php +++ b/presentation/login.php @@ -74,20 +74,21 @@ if ($loginAction == "loginForm") { // check for a location to forward to if (isset($redirect) && strlen(trim($redirect))>0) { - // need to strip owl_root_url off $redirect - if (strlen($default->owl_root_url) > 0) { - $tmp = urldecode($redirect); - $default->log->debug("login.php: substr($tmp, strpos($tmp, $default->owl_root_url), strlen($tmp))"); - $redirect = substr($tmp, strpos($tmp, $default->owl_root_url), strlen($tmp)); - $default->log->debug("login.php: redirect=$redirect"); - } - // remove any params from redirect before looking up from sitemap if (strstr($redirect, "?")) { $queryString = substr($redirect, strpos($redirect, "?")+1, strlen($redirect)); $redirect = substr($redirect, 0, strpos($redirect, "?")); $default->log->debug("login.php redirect=$redirect; querystring=$queryString"); } + + // need to strip owl_root_url off $redirect + if (strlen($default->owl_root_url) > 0) { + $tmp = urldecode($redirect); + $default->log->debug("login.php: substr($tmp, strpos($tmp, $default->owl_root_url), strlen($tmp))"); + $redirect = substr($tmp, strpos($tmp, $default->owl_root_url), strlen($tmp)); + $default->log->debug("login.php: redirect=$redirect"); + } + $url = generateControllerUrl($default->siteMap->getActionFromPage($redirect)); // else redirect to the dashboard } else {