summaryrefslogtreecommitdiff
path: root/classes/Session.php
diff options
context:
space:
mode:
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 ac80279c5..a92ce405b 100644
--- a/classes/Session.php
+++ b/classes/Session.php
@@ -110,9 +110,18 @@ class Session extends Memcached_DataObject
$session = new Session();
$session->whereAdd('modified < "'.$epoch.'"');
- $result = $session->delete(DB_DATAOBJECT_WHEREADD_ONLY);
- self::logdeb("garbage collection result = $result");
+ $session->find();
+
+ while ($session->fetch()) {
+ $other = new Session();
+ $other->id = $session->id;
+ self::logdeb("Collecting session $other->id");
+ $result = $other->delete();
+ self::logdeb("garbage collection result = $result");
+ }
+
+ $session->free();
}
static function setSaveHandler()