From: Lo?c C. <lo...@us...> - 2001-04-13 10:29:21
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv25488/chat Modified Files: messages_low.php3 loader.php3 input.php3 handle_input.php3 Log Message: Fix two big problems: session last log time wasn't updated if no message is sent and starting chat page reloads in hidden frames when session was out Index: messages_low.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/messages_low.php3,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** messages_low.php3 2001/04/12 23:45:34 1.6 --- messages_low.php3 2001/04/13 10:29:19 1.7 *************** *** 45,49 **** /** ! * Start the session handler */ require('./lib/db_sessions.lib.' . C_EXTENSION); --- 45,50 ---- /** ! * Start the session handler and update the last log time related to the ! * session. */ require('./lib/db_sessions.lib.' . C_EXTENSION); *************** *** 56,59 **** --- 57,61 ---- ); dbSessionStart(); + dbSessionUpdateLogTime(); /** Index: loader.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/loader.php3,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** loader.php3 2001/04/12 23:38:25 1.7 --- loader.php3 2001/04/13 10:29:19 1.8 *************** *** 49,53 **** /** ! * Start the session handler */ require('./lib/db_sessions.lib.' . C_EXTENSION); --- 49,55 ---- /** ! * Start the session handler and: ! * - move to the start page if it's a newly created session; ! * - update the last log time related to the session else. */ require('./lib/db_sessions.lib.' . C_EXTENSION); *************** *** 56,63 **** C_DB_USER, C_DB_PASS, C_SESS_TBL, ! C_SESS_DEL * 60, ! C_CHAT_URL ); dbSessionStart(); /** --- 58,73 ---- C_DB_USER, C_DB_PASS, C_SESS_TBL, ! C_SESS_DEL * 60 ); dbSessionStart(); + if ($dbSessionIsNew) + { + include('./lib/move_to_start.lib.' . C_EXTENSION); + exit(); + } + else + { + dbSessionUpdateLogTime(); + } /** Index: input.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/input.php3,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** input.php3 2001/04/13 08:59:00 1.15 --- input.php3 2001/04/13 10:29:19 1.16 *************** *** 56,60 **** /** ! * Start the session handler */ require('./lib/db_sessions.lib.' . C_EXTENSION); --- 56,61 ---- /** ! * Start the session handler and update the last log time related to the ! * session. */ require('./lib/db_sessions.lib.' . C_EXTENSION); *************** *** 67,70 **** --- 68,72 ---- ); dbSessionStart(); + dbSessionUpdateLogTime(); /** Index: handle_input.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/handle_input.php3,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** handle_input.php3 2001/04/13 08:59:00 1.13 --- handle_input.php3 2001/04/13 10:29:19 1.14 *************** *** 56,60 **** /** ! * Start the session handler */ require('./lib/db_sessions.lib.' . C_EXTENSION); --- 56,62 ---- /** ! * Start the session handler and: ! * - move to the start page if it's a newly created session; ! * - update the last log time related to the session else. */ require('./lib/db_sessions.lib.' . C_EXTENSION); *************** *** 63,70 **** C_DB_USER, C_DB_PASS, C_SESS_TBL, ! C_SESS_DEL * 60, ! C_CHAT_URL ); dbSessionStart(); /** --- 65,80 ---- C_DB_USER, C_DB_PASS, C_SESS_TBL, ! C_SESS_DEL * 60 ); dbSessionStart(); + if ($dbSessionIsNew) + { + include('./lib/move_to_start.lib.' . C_EXTENSION); + exit(); + } + else + { + dbSessionUpdateLogTime(); + } /** |