summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-10-11 13:39:10 -0400
committerCraig Andrews <candrews@integralblue.com>2009-10-11 13:39:10 -0400
commitf719720e8ad3b09d664e33172bafef2b0fb91eea (patch)
treeef260a2b132405013025f61930c3850f498318c9 /classes
parent96d32fb8d0752c13cb1a768a3e4c3ad36a4a0188 (diff)
parent006cfc528edab32548d1265df5dada09a1536aed (diff)
Merge remote branch 'statusnet/0.8.x' into 0.9.x
Conflicts: lib/common.php
Diffstat (limited to 'classes')
-rw-r--r--classes/Session.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/classes/Session.php b/classes/Session.php
index d641edbbe..79a69a96e 100644
--- a/classes/Session.php
+++ b/classes/Session.php
@@ -85,9 +85,18 @@ class Session extends Memcached_DataObject
return $session->insert();
} else {
- $session->session_data = $session_data;
+ if (strcmp($session->session_data, $session_data) == 0) {
+ self::logdeb("Not writing session '$id'; unchanged");
+ return true;
+ } else {
+ self::logdeb("Session '$id' data changed; updating");
+
+ $orig = clone($session);
+
+ $session->session_data = $session_data;
- return $session->update();
+ return $session->update($orig);
+ }
}
}