diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-05-20 20:58:55 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-05-20 20:58:55 +0000 |
commit | 84925d852d34ac9c6fcc2c3c5e749b8bd70bc22d (patch) | |
tree | 0e279dba5f43bfe18e537ad52224909ea44966c4 | |
parent | fdf043fa2b472ade502fc2228f3592377636ad45 (diff) | |
download | forums-84925d852d34ac9c6fcc2c3c5e749b8bd70bc22d.tar forums-84925d852d34ac9c6fcc2c3c5e749b8bd70bc22d.tar.gz forums-84925d852d34ac9c6fcc2c3c5e749b8bd70bc22d.tar.bz2 forums-84925d852d34ac9c6fcc2c3c5e749b8bd70bc22d.tar.xz forums-84925d852d34ac9c6fcc2c3c5e749b8bd70bc22d.zip |
Moved the append_sid routine to the sessions.php file
git-svn-id: file:///svn/phpbb/trunk@317 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/includes/functions.php | 19 | ||||
-rw-r--r-- | phpBB/includes/sessions.php | 23 |
2 files changed, 23 insertions, 19 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 7777bc3a6f..9106c2c5ec 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -272,25 +272,6 @@ function create_date($format, $gmepoch, $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 // diff --git a/phpBB/includes/sessions.php b/phpBB/includes/sessions.php index 72f3d4fad6..c22abf1aad 100644 --- a/phpBB/includes/sessions.php +++ b/phpBB/includes/sessions.php @@ -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); + +} + ?>
\ No newline at end of file |