|
From: Meik S. <acy...@ph...> - 2009-10-29 14:00:55
|
Author: acydburn
Date: Thu Oct 29 14:00:43 2009
New Revision: 10244
Log:
Implement suggestion in ticket #52155 - Better way to generate SID-free links in feed.php
Modified:
branches/phpBB-3_0_0/phpBB/feed.php
Modified: branches/phpBB-3_0_0/phpBB/feed.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/feed.php (original)
--- branches/phpBB-3_0_0/phpBB/feed.php Thu Oct 29 14:00:43 2009
***************
*** 212,228 ****
{
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;
}
/**
--- 212,218 ----
{
global $board_url;
! return append_sid($board_url . $url, $params, true, '');
}
/**
|