aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-17 12:55:01 -0800
committerfriendica <info@friendica.com>2014-01-17 12:55:01 -0800
commitc7585e4e584909b78a92f83a3cd9e0a74204a257 (patch)
tree8a053edc26e4d1736cb10537ca9e92b8e7317aee /include
parent1a76f1c65952af16be6f00cde9317b817028f1b6 (diff)
parenta0d6d3c7f9bf3de97fcf9544631eca45ca2d4cb3 (diff)
downloadvolse-hubzilla-c7585e4e584909b78a92f83a3cd9e0a74204a257.tar.gz
volse-hubzilla-c7585e4e584909b78a92f83a3cd9e0a74204a257.tar.bz2
volse-hubzilla-c7585e4e584909b78a92f83a3cd9e0a74204a257.zip
Merge pull request #274 from zzottel/master
set jsAvailable cookie expire time to match PHPSESSID's
Diffstat (limited to 'include')
-rw-r--r--include/session.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/session.php b/include/session.php
index 6072bdb33..be1ec5ee7 100644
--- a/include/session.php
+++ b/include/session.php
@@ -15,6 +15,15 @@ function new_cookie($time) {
session_regenerate_id(false);
q("UPDATE session SET sid = '%s' WHERE sid = '%s'", dbesc(session_id()), dbesc($old_sid));
+
+ if (x($_COOKIE, 'jsAvailable')) {
+ if ($time) {
+ $expires = time() + $time;
+ } else {
+ $expires = 0;
+ }
+ setcookie('jsAvailable', $_COOKIE['jsAvailable'], $expires);
+ }
}