1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +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:
Paul S. Owen
2001-05-20 20:58:55 +00:00
parent fdf043fa2b
commit 84925d852d
2 changed files with 23 additions and 19 deletions

View File

@@ -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);
}
?>