Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
301c6e75
Commit
301c6e75
authored
Apr 27, 2007
by
Dries
Browse files
- Patch
#139517
by Grugnog2: improved code comment.
parent
29055d34
Changes
1
Show whitespace changes
Inline
Side-by-side
includes/session.inc
View file @
301c6e75
...
...
@@ -65,10 +65,9 @@ function sess_write($key, $value) {
if
(
!
db_num_rows
(
$result
))
{
// Only save session data when when the browser sends a cookie. This keeps
// crawlers out of session table. This improves speed up queries, reduces
// memory, and gives more useful statistics. We can't eliminate anonymous
// session table rows without breaking throttle module and "Who's Online"
// block.
// crawlers out of session table. This reduces memory and server load,
// and gives more useful statistics. We can't eliminate anonymous session
// table rows without breaking throttle module and "Who's Online" block.
if
(
$user
->
uid
||
$value
||
count
(
$_COOKIE
))
{
db_query
(
"INSERT INTO
{
sessions
}
(sid, uid, cache, hostname, session, timestamp) VALUES ('%s', %d, %d, '%s', '%s', %d)"
,
$key
,
$user
->
uid
,
isset
(
$user
->
cache
)
?
$user
->
cache
:
''
,
$_SERVER
[
"REMOTE_ADDR"
],
$value
,
time
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment