phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions_db.inc.php,1.12,1.13


From: Jason Wies <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.sessions_db.inc.php,1.12,1.13
Date: Tue, 24 Sep 2002 01:23:33 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv15406/phpgwapi/inc

Modified Files:
        class.sessions_db.inc.php 
Log Message:
Make session timeouts configurable and check for session timeout in verify() 
(every page load) instead of only when creating or destroying sessions

Index: class.sessions_db.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.sessions_db.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** class.sessions_db.inc.php   15 Sep 2002 23:42:56 -0000      1.12
--- class.sessions_db.inc.php   24 Sep 2002 05:23:30 -0000      1.13
***************
*** 142,145 ****
--- 142,151 ----
                        $db->next_record();
  
+                       if ($db->f('session_dla') <= (time() - 
$GLOBALS['phpgw_info']['server']['sessions_timeout']))
+                       {
+                               $this->clean_sessions();
+                               return False;
+                       }
+ 
                        $this->session_flags = $db->f('session_flags');
  
***************
*** 288,299 ****
                function clean_sessions()
                {
!                       // If you plan on using the cron apps, please remove 
the following lines.
!                       // I am going to make this a config option durring 
0.9.11, instead of an application (jengo)
! 
!                       $GLOBALS['phpgw']->db->query("DELETE FROM 
phpgw_sessions WHERE session_dla <= '" . (time() - 7200)
                                . "' AND session_flags 
!='A'",__LINE__,__FILE__);
  
                        // This is set a little higher, we don't want to kill 
session data for anonymous sessions.
!                       $GLOBALS['phpgw']->db->query("DELETE FROM 
phpgw_app_sessions WHERE session_dla <= '" . (time() - 86400)
                                . "'",__LINE__,__FILE__);
                }
--- 294,302 ----
                function clean_sessions()
                {
!                       $GLOBALS['phpgw']->db->query("DELETE FROM 
phpgw_sessions WHERE session_dla <= '" . (time() - 
$GLOBALS['phpgw_info']['server']['sessions_timeout'])
                                . "' AND session_flags 
!='A'",__LINE__,__FILE__);
  
                        // This is set a little higher, we don't want to kill 
session data for anonymous sessions.
!                       $GLOBALS['phpgw']->db->query("DELETE FROM 
phpgw_app_sessions WHERE session_dla <= '" . (time() - 
$GLOBALS['phpgw_info']['server']['sessions_app_timeout'])
                                . "'",__LINE__,__FILE__);
                }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]