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
|
define_tag(
'refresh',
-namespace='site_',
-async, -atomic,
-req='username',
-req='password',
-priority='replace',
-description='Restarts the current Lasso Site asynchronously.'
);
protect;
local(
'url' = 'http://127.0.0.1/serveradmin.0.lassoapp',
'getparams' = array(
'tab1' = 'sites',
'tab2' = 'sites',
'tab3' = 'sites',
'site_id' = site_id,
'action' = 'Start'
)
);
// wait a second so the calling page finishes
sleep(1000);
include_url(
#url,
-getparams=#getparams,
-username=#username,
-password=#password
);
handle_error;
log_critical('[site_refresh] failed: ' + error_msg);
return;
/handle_error;
/protect;
/define_tag;
|