mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-21 16:22:22 +02:00
Moved the append_sid routine to the sessions.php file
git-svn-id: file:///svn/phpbb/trunk@317 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
fdf043fa2b
commit
84925d852d
@ -271,25 +271,6 @@ function create_date($format, $gmepoch, $tz)
|
||||
return (gmdate($format, $gmepoch + (3600 * $tz)));
|
||||
}
|
||||
|
||||
//
|
||||
// Append $SID to a url
|
||||
// Borrowed from phplib
|
||||
// and modified
|
||||
//
|
||||
function append_sid($url)
|
||||
{
|
||||
global $SID;
|
||||
|
||||
if(!empty($SID) && !eregi("^http:", $url) && !eregi("sid=", $url))
|
||||
{
|
||||
$url = ereg_replace("[&?]+$", "", $url);
|
||||
$url .= ( (strpos($url, "?") != false) ? "&" : "?" ) . $SID;
|
||||
}
|
||||
|
||||
return($url);
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Pagination routine, generates
|
||||
// page number sequence
|
||||
|
@ -463,4 +463,27 @@ function session_end($session_id, $user_id)
|
||||
|
||||
} // session_end()
|
||||
|
||||
//
|
||||
// Append $SID to a url
|
||||
// Borrowed from phplib and modified. This is an
|
||||
// extra routine utilised by the session
|
||||
// code above and acts as a wrapper
|
||||
// around every single URL and form action. If
|
||||
// you replace the session code you must
|
||||
// include this routine, even if it's empty.
|
||||
//
|
||||
function append_sid($url)
|
||||
{
|
||||
global $SID;
|
||||
|
||||
if(!empty($SID) && !eregi("^http:", $url) && !eregi("sid=", $url))
|
||||
{
|
||||
$url = ereg_replace("[&?]+$", "", $url);
|
||||
$url .= ( (strpos($url, "?") != false) ? "&" : "?" ) . $SID;
|
||||
}
|
||||
|
||||
return($url);
|
||||
|
||||
}
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user