summaryrefslogtreecommitdiff
path: root/classes/Session.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2009-10-13 16:45:26 +0000
committerBrion Vibber <brion@pobox.com>2009-10-13 16:45:26 +0000
commit834ac7aa1172518c112bbf90561ead34499e20b8 (patch)
tree474dc49eed8ff3542e6d2c8154e14fa4b8432ada /classes/Session.php
parent18df82ba2302d5b72bc42f4d3296d6fff7d16341 (diff)
parent006cfc528edab32548d1265df5dada09a1536aed (diff)
Merge branch '0.8.x' of git@gitorious.org:~brion/statusnet/brion-fixes into 0.8.x
Diffstat (limited to 'classes/Session.php')
-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);
+ }
}
}