[Mydatabasepilot-cvs] MyDatabasePilot Application.cfm,1.2,1.3 MyDatabasePilot.cfm,1.5,1.6
Status: Alpha
Brought to you by:
nanoface
From: <nan...@us...> - 2003-04-21 22:31:54
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot In directory sc8-pr-cvs1:/tmp/cvs-serv30705 Modified Files: Application.cfm MyDatabasePilot.cfm Log Message: Bug Fix: [ 724471 ] Session Expiry Handling Required Added session.loggedIn = "1" flag in MyDatabasePilot.cfm Added Active Session Checking, and session.requestLogIn = "1" flag in Application.cfm file Index: Application.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Application.cfm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Application.cfm 6 Apr 2003 05:48:19 -0000 1.2 --- Application.cfm 21 Apr 2003 22:31:51 -0000 1.3 *************** *** 2,9 **** * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * * Template: Application.cfm * ! * Purpose: Creates Client variables for connecting to database * ! * Todo: Set up custom global error handling pages * ! * Include User-Defined Functions Used on Most Pages * ! * Known Issues/Bugs: * ********************************************************************************************---> --- 2,7 ---- * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * * Template: Application.cfm * ! * Purpose: - Creates Client variables for connecting to database * ! * - Application wide variables, functions and errorhandling * ********************************************************************************************---> *************** *** 40,43 **** --- 38,54 ---- <cfif NOT IsDefined("session.userName")><cfset session.userName = ""></cfif> <!--- Enter default User Name ---> <cfif NOT IsDefined("session.password")><cfset session.password = ""></cfif> <!--- Enter default password ---> + </cflock> + + <!---||| Ensure that session has not expired or a default data source is provided |||---> + <!--- Lock code that uses session variables to ensure data integrity ---> + <cflock timeout = "30" throwontimeout="no" type = "exclusive" scope = "session"> + <!--- If datasource is Empty String, this would indicate that no default data source was provided ---> + <!--- If user is not loggedIn and no default datasource exists, and login page was not yet requested ---> + <cfif session.dataSource IS "" AND NOT IsDefined("session.loggedIn") AND NOT IsDefined("session.requestLogIn")> + <!--- This line is needed so user is not sent on an endless redirect, since even the login form page calls the Application.cfm file ---> + <cfset session.requestLogIn = "1"> + <!--- Redirect User to login form if no data source exists ---> + <cflocation url="index.cfm"> + </cfif> </cflock> Index: MyDatabasePilot.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/MyDatabasePilot.cfm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MyDatabasePilot.cfm 18 Apr 2003 04:39:20 -0000 1.5 --- MyDatabasePilot.cfm 21 Apr 2003 22:31:51 -0000 1.6 *************** *** 19,22 **** --- 19,23 ---- <cfset session.userName = #Trim(Form.userName)#> <!--- User Name ---> <cfset session.password = #Trim(Form.password)#> <!--- Password ---> + <cfset session.loggedIn = "1"> <!--- Set the loggedIn Flag to True ---> </cflock> </cfif> |