Lasso Soft Inc. > Home

[site_refresh]

Linksite_refresh
AuthorJason Huck
CategoryAdministration
Version8.5.x
LicensePublic Domain
Posted04 Mar 2007
Updated04 Mar 2007
More by this author...

Description

This is an alternate method of restarting the current Lasso Site suggested by Fletcher Sandbeck. Requires a ServerAdmin username and password. Operates atomically and asynchronously, and sleeps for a second to allow the calling page to finish processing and be returned to the user.

Sample Usage

site_refresh(
    -username='xxxxxx',
    -password='xxxxxx'
);

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

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;

Related Tags

Comments

No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft