aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index ba203c9281..c36b56710e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -268,4 +268,23 @@ function create_date($format, $gmepoch, $tz)
{
return (gmdate($format, $gmepoch + (3600 * $tz)));
}
-?>
+
+//
+// Append $SID to a url
+// Borrowed from phplib
+//
+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