summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-04-27 07:47:38 +0000
committerDries Buytaert <dries@buytaert.net>2007-04-27 07:47:38 +0000
commit301c6e753905a03b9f8b874b0dd684780e28799b (patch)
treee246b24940401a471221ffc5a4af13a9d1c30847
parent29055d34d6f0ceee253a4122bb6c9dae6cb53b2b (diff)
downloadbrdo-301c6e753905a03b9f8b874b0dd684780e28799b.tar.gz
brdo-301c6e753905a03b9f8b874b0dd684780e28799b.tar.bz2
- Patch #139517 by Grugnog2: improved code comment.
-rw-r--r--includes/session.inc7
1 files changed, 3 insertions, 4 deletions
diff --git a/includes/session.inc b/includes/session.inc
index 97379907c..103209671 100644
--- a/includes/session.inc
+++ b/includes/session.inc
@@ -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());
}