projects
/
quix0rs-gnu-social.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a68722c
)
marker in sessions
author
Evan Prodromou
<evan@controlyourself.ca>
Sat, 27 Jun 2009 12:07:14 +0000
(
05:07
-0700)
committer
Evan Prodromou
<evan@controlyourself.ca>
Sat, 27 Jun 2009 12:07:14 +0000
(
05:07
-0700)
lib/util.php
patch
|
blob
|
history
diff --git
a/lib/util.php
b/lib/util.php
index f6d50b18074be35f8729ae3410ed2f6fbe30c44b..e5a8eaea06250438a0299256507a77988793c860 100644
(file)
--- a/
lib/util.php
+++ b/
lib/util.php
@@
-139,8
+139,19
@@
function common_have_session()
function common_ensure_session()
{
+ $c = null;
+ if (array_key_exists(session_name, $_COOKIE)) {
+ $c = $_COOKIE[session_name()];
+ }
if (!common_have_session()) {
@session_start();
+ if (!isset($_SESSION['started'])) {
+ $_SESSION['started'] = time();
+ if (!empty($c)) {
+ common_log(LOG_WARNING, 'Session cookie "' . $_COOKIE[session_name()] . '" ' .
+ ' is set but started value is null');
+ }
+ }
}
}