mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-18 22:58:10 +01:00
Implement suggestion in ticket #52155 - Better way to generate SID-free links in feed.php
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10244 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
3d3e673396
commit
2258d85623
@ -212,17 +212,7 @@ function feed_append_sid($url, $params)
|
||||
{
|
||||
global $board_url;
|
||||
|
||||
$link = append_sid($board_url . $url, $params);
|
||||
|
||||
// Remove added sid - not as easy as it sounds. ;)
|
||||
$link = (strpos($link, 'sid=') !== false) ? trim(preg_replace('/(&|&|\?)sid=[a-z0-9]+(&|&)?/', '\1', $link), '?& ') : $link;
|
||||
|
||||
// Now the only thing remaining could be an empty &
|
||||
$link = (substr($link, -5) === '&') ? substr($link, 0, -5) : $link;
|
||||
// And &#xxx
|
||||
$link = str_replace('&#', '#', $link);
|
||||
|
||||
return $link;
|
||||
return append_sid($board_url . $url, $params, true, '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user