aboutsummaryrefslogtreecommitdiffstats
path: root/include/session.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-18 21:46:16 -0800
committerfriendica <info@friendica.com>2014-01-18 21:46:16 -0800
commit3f7032e542e3c451507fc9266ab3536155c8190f (patch)
tree62c0842da5da6d30b2ad8bc77a1f1bc55e423cc2 /include/session.php
parentdb67f08d3c3ae3925479844e0f9b25bab13dabdc (diff)
parent331609cb871517bd35416669492488a3bc14702d (diff)
downloadvolse-hubzilla-3f7032e542e3c451507fc9266ab3536155c8190f.tar.gz
volse-hubzilla-3f7032e542e3c451507fc9266ab3536155c8190f.tar.bz2
volse-hubzilla-3f7032e542e3c451507fc9266ab3536155c8190f.zip
Merge https://github.com/friendica/red into zpull
Diffstat (limited to 'include/session.php')
-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);
+ }
}