From 84925d852d34ac9c6fcc2c3c5e749b8bd70bc22d Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sun, 20 May 2001 20:58:55 +0000 Subject: [PATCH] Moved the append_sid routine to the sessions.php file git-svn-id: file:///svn/phpbb/trunk@317 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 19 ------------------- 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 @@ -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 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