diff options
author | zottel <github@zottel.net> | 2014-01-17 07:56:34 +0100 |
---|---|---|
committer | zottel <github@zottel.net> | 2014-01-17 07:56:34 +0100 |
commit | a0d6d3c7f9bf3de97fcf9544631eca45ca2d4cb3 (patch) | |
tree | fa2ee24f83ce5a9745ff84748822aad5888d8ffb | |
parent | 359d7980292490da370e49b5f3583d801157b5b7 (diff) | |
download | volse-hubzilla-a0d6d3c7f9bf3de97fcf9544631eca45ca2d4cb3.tar.gz volse-hubzilla-a0d6d3c7f9bf3de97fcf9544631eca45ca2d4cb3.tar.bz2 volse-hubzilla-a0d6d3c7f9bf3de97fcf9544631eca45ca2d4cb3.zip |
set jsAvailable cookie expire time to match PHPSESSID's
-rw-r--r-- | include/session.php | 9 |
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); + } } |