-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApplication.cfc
45 lines (33 loc) · 1.43 KB
/
Application.cfc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<cfcomponent output="false">
<cfset THIS.name = hash( getCurrentTemplatePath() & CGI.HTTP_HOST ) />
<cfset THIS.SessionManagement = true />
<cfset THIS.SessionTimeout = CreateTimeSpan(0,2,0,0) />
<!--- Set to 1 second while testing CLIENT variables authentication functionality --->
<!--- <cfset THIS.SessionTimeout = CreateTimeSpan(0,0,0,1) /> --->
<cfset THIS.clientManagement = true>
<cfset THIS.datasource = "cipci"/>
<cfset THIS.ormEnabled = true />
<cfset THIS.ormsettings.cfclocation = "application/ORM" />
<cfset THIS.ormsettings.eventHandling = true />
<cfset THIS.invokeImplicitAccessor = true>
<cfset request.db_key = 'QPet5vFnC7+ep6S/RW5k4KvlyybcXWgs'>
<cfset THIS.setDomainCookies = false />
<!--- Layout manager --->
<cffunction name="OnRequestStart" returntype="boolean" output="true">
<cfargument
name="template"
type="string"
required="true"
hint="I am the template requested by the user."
/>
<!--- If reload is called or application is in full reload mode then run onApplicationStart to reload all singletons --->
<cfif structKeyExists(url, "APPReload") OR structKeyExists(url, "ar")>
<!--- Create an exclusive lock to make this call thread safe --->
<cflock name="reloadApp" timeout="60" type="exclusive">
<!--- Reload the app --->
<cfset ORMReload()>
</cflock>
</cfif>
<cfreturn true>
</cffunction>
</cfcomponent>