-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathFakeApplication.cfc
42 lines (37 loc) · 1.52 KB
/
FakeApplication.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
<cfcomponent extends="Application">
<cfscript>
variables.framework.applicationKey = 'CfTracker-20100927';
variables.framework.base = '/railo_plugin_directory/CfTracker/';
request.appKey = variables.framework.applicationKey;
this.base = variables.framework.base;
this.railoPlugin = true;
this.assetBegin = 'plugin/CfTracker/';
this.assetEnd = '.cfm';
</cfscript>
<cffunction name="init" output="false">
<cfscript>
variables.configApplication();
variables.onApplicationStart();
return this;
</cfscript>
</cffunction>
<cffunction name="configApplication" output="false">
<cfset var lc = {} />
<cfset lc.path = GetDirectoryFromPath(GetCurrentTemplatePath()) />
<cfset lc.mappings = {
'/railo_plugin_directory' = lc.path & '../',
'/javaloader' = lc.path & 'libraries/javaloader',
'/validatethis' = lc.path & 'libraries/validatethis'
} />
<cfapplication name="webadmin" action="update" mappings="#lc.mappings#" customtagpaths="#lc.path#libraries/tags/forms/cfUniForm" />
</cffunction>
<cffunction name="BuildUrl" output="false">
<cfargument name="action" type="string" />
<cfargument name="path" type="string" default="#variables.framework.baseURL#" />
<cfargument name="queryString" type="string" default="" />
<cfset var lc = {} />
<cfset lc.url = super.buildUrl(arguments.action, arguments.path, arguments.queryString) />
<cfset lc.url = ReReplace(lc.url, '(web|server)(\.cfm\?action=)(.*)$', '\1\2plugin&plugin=CfTracker&fw1action=\3') />
<cfreturn lc.url />
</cffunction>
</cfcomponent>