-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApplication.cfc
More file actions
38 lines (33 loc) · 1002 Bytes
/
Copy pathApplication.cfc
File metadata and controls
38 lines (33 loc) · 1002 Bytes
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
component {
this.name = "CarryClub";
this.applicationTimeout = createTimeSpan(0, 2, 0, 0);
this.sessionManagement = true;
this.sessionTimeout = createTimeSpan(0, 0, 30, 0);
// Define datasource
this.datasource = "carry_club";
// Define mappings if needed
this.mappings = {
"/includes" = expandPath("./includes"),
"/components" = expandPath("./components"),
"/admin" = expandPath("./admin")
};
// Application startup
function onApplicationStart() {
application.dsn = "carry_club";
return true;
}
// Session startup
function onSessionStart() {
session.cart = [];
session.user = {};
}
// Request startup
function onRequestStart(targetPage) {
if(structKeyExists(url, "reset") && url.reset) {
applicationStop();
sessionInvalidate();
location(url=targetPage, addToken=false);
}
return true;
}
}