changeset 2913:99d5fca40c1e

fix session expiry update bug
author Johannes Berg <johannes AT sipsolutions DOT net>
date Sun, 28 Oct 2007 20:40:12 +0100
parents 4be125bafc8a
children 25ee42ee758a
files MoinMoin/session.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/session.py	Sun Oct 28 20:13:45 2007 +0100
+++ b/MoinMoin/session.py	Sun Oct 28 20:40:12 2007 +0100
@@ -319,7 +319,6 @@
 
     def set(self, request, session_name, expires):
         """ Set moin_session cookie """
-        request.session.set_expiry(expires)
         self._set_cookie(request, session_name, expires)
 
     def get(self, request):
@@ -412,6 +411,7 @@
             lifetime = _get_session_lifetime(request, user_obj)
             expires = time.time() + lifetime
             session_id_handler.set(request, session.name, expires)
+            request.session.set_expiry(expires)
         else:
             if 'user.id' in session:
                 session.delete()
@@ -419,6 +419,7 @@
             if lifetime:
                 expires = time.time() + lifetime
                 session_id_handler.set(request, session.name, expires)
+                request.session.set_expiry(expires)
             else:
                 session.delete()