-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.cfm
34 lines (28 loc) · 1.05 KB
/
index.cfm
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
<!--- Main plugin page. All requests are being handled here. --->
<cfscript>
include 'plugin/config.cfm';
import MuraRedirect.model.Redirects;
m = $;
action(pluginConfig);
function action(pluginConfig) {
var action = m.event('action');
var result = {};
var result = {};
if (action == 'save_redirect' || action == 'delete_redirect' ||
action == 'reset_redirect' || action == 'disable_redirect' ||
action == 'enable_redirect') {
var redirectMgt = new MuraRedirect.model.RedirectMgt(m);
result = redirectMgt.handleAction(action);
}
if (structKeyExists(result, 'action'))
action = result.action;
if (structKeyExists(result, 'redirect'))
redirect = result.redirect;
if (structKeyExists(result, 'message'))
message = result.message;
if (action == 'edit_redirect')
include 'views/edit_redirect.cfm';
else
include 'views/redirect_list.cfm';
}
</cfscript>