1
I looked through a number of other posts and can't find one that seems to address this problem.
Scenerio:
1. User comes to site
2. User browses to topic
3. User wants to post, so presses register to post.
4. User is directed to login page, URL =
XOOPSURL/user.php?xoops_redirect=/modules/newbb/viewtopic.php?topic_id=167&forum=38
5. User logs in correctly.
6. User is redirected to an incorrect URL (note, forum= is missing):
XOOPSURL/modules/newbb/viewtopic.php?topic_id=167
7. Instead of being directed to the correct topic (since the forumID is not there), I am directed to main forum page.
I have a feeling that it doesn't like having a "&" as part of the redirect URL (treats it as a new var).
My problem is that even though I'm running 2.0.3, I'm not sure if the problem is fixed in 2.0.5 (I've got CVS latest version of the following checklogin lines):
checklogin.php ~ lines 65-85
if (!empty($HTTP_POST_VARS['xoops_redirect']) && !strpos($HTTP_POST_VARS['xoops_redirect'], 'register')) {
$parsed = parse_url(XOOPS_URL);
$url = isset($parsed['scheme']) ? $parsed['scheme'].'://' : 'http://';
if (isset($parsed['host'])) {
$url .= isset($parsed['port']) ?$parsed['host'].':'.$parsed['port'].trim($HTTP_POST_VARS['xoops_redirect']): $parsed['host'].trim($HTTP_POST_VARS['xoops_redirect']);
} else {
$url = xoops_getenv('HTTP_HOST').trim($HTTP_POST_VARS['xoops_redirect']);
}
} else {
$url = XOOPS_URL.'/index.php';
}
So then, if my checklogin script is up-to-date; has this been fixed somewhere else? (possibly on some forum file?)
Hope this makes sense,
thanks,
Keith