Example 1
$url = 'http://xoopscube.org/index.php#mainmenu';
original
$url is
'http://xoopscube.org/index.php#mainmenu?xoops_redirect=ReqUri&SID=SID'
uncertainty
$url is
'http://xoopscube.org/index.php?xoops_redirect=ReqUri&SID=SID#mainmenu'
Example 2
$url = 'http://xoopscube.org/index.php?ex=Example#mainmenu';
original
$url is
'http://xoopscube.org/index.php?ex=Example#mainmenu&xoops_redirect=ReqUri&SID=SID'
uncertainty
$url is
'http://xoopscube.org/index.php?ex=Example&xoops_redirect=ReqUri&SID=SID#mainmenu'
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
redirect_header() : support URL fragment(anchor)
original (/include/functions.php Line 419 - 424)
[code]
if (!strstr($url, '?')) {
$url .= '?xoops_redirect='.urlencode($xoopsRequestUri);
} else {
$url .= '&xoops_redirect='.urlencode($xoopsRequestUri);
}
[/code]
uncertainty
[code]
if (!strstr($url, '#')) {
if (!strstr($url, '?')) {
$url .= '?xoops_redirect=' . urlencode($xoopsRequestUri);
} else {
$url .= '&xoops_redirect=' . urlencode($xoopsRequestUri);
}
} else {
if (!strstr($url, '?')) {
$url = str_replace('#', '?xoops_redirect=' . urlencode($xoopsRequestUri) . '#', $url);
} else {
$url = str_replace('#', '&xoops_redirect=' . urlencode($xoopsRequestUri) . '#', $url);
}
}
[/code]
SID
original (/include/functions.php Line 426 - 432)
[code]
if (!strstr($url, '?')) {
$url .= '?' . SID;
}
else {
$url .= '&'.SID;
}
[/code]
uncertainty
[code]
if (!strstr($url, '#')) {
if (!strstr($url, '?')) {
$url .= '?' . SID;
} else {
$url .= '&' . SID;
}
} else {
if (!strstr($url, '?')) {
$url = str_replace('#', '?' . SID .'#', $url);
} else {
$url = str_replace('#', '&' . SID . '#', $url);
}
}
[/code]
Example 1
$url = 'http://xoopscube.org/index.php#mainmenu';
original
$url is
'http://xoopscube.org/index.php#mainmenu?xoops_redirect=ReqUri&SID=SID'
uncertainty
$url is
'http://xoopscube.org/index.php?xoops_redirect=ReqUri&SID=SID#mainmenu'
Example 2
$url = 'http://xoopscube.org/index.php?ex=Example#mainmenu';
original
$url is
'http://xoopscube.org/index.php?ex=Example#mainmenu&xoops_redirect=ReqUri&SID=SID'
uncertainty
$url is
'http://xoopscube.org/index.php?ex=Example&xoops_redirect=ReqUri&SID=SID#mainmenu'
Shall we discuss about it in 'Developers - Legacy', not this form? (^^;
This forum is "About managing the project on sf.net"...Sorry.
(I've tried move this topic to the Legacy forum, but it was impossible)
I'm sorry the contribution to an improper forum.
The outline of each forum was not understood.