summaryrefslogblamecommitdiffstats
path: root/Plugins/Core/web_reload.lua
blob: 3a59ad6b6ba50fa23752c41b147d2bb43272280d (plain) (tree)
1
2
3
4
5
6
7
8
9


                                         
                                                       



                                                                                                                                
                                                          





                                                                                                     
function HandleRequest_Reload( Request )
	local Content = ""
	
	if( Request.PostParams["reload"] ~= nil ) then
		Content = Content .. "<head><meta http-equiv=\"refresh\" content=\"2;././\"></head>"
		Content = Content .. "<p>Reloading plugins... This can take a while depending on the plugins you're using.</p>"
		cRoot:Get():GetPluginManager():ReloadPlugins()
	else
		Content = Content .. "<form method=POST>"
		Content = Content .. "<p>Click the reload button to reload all plugins!<br>"
		Content = Content .. "<input type=\"submit\" name=\"reload\" value=\"Reload!\"></p>"
		Content = Content .. "</form>"
	end
	return Content
end