From 84b63e040c4dd3f55aafc6089b36cbe1066a58f7 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 18 Oct 2013 20:08:58 +0000 Subject: Remove all calls to 'module' in preparation for move to Lua 5.2 Use mymodule parameter for module definition. This was also helpful in revealing places where the code relied on the global environment. --- clamav-controller.lua | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'clamav-controller.lua') diff --git a/clamav-controller.lua b/clamav-controller.lua index dcce6e5..ee54309 100644 --- a/clamav-controller.lua +++ b/clamav-controller.lua @@ -1,27 +1,29 @@ -module(..., package.seeall) +local mymodule = {} -default_action = "status" +mymodule.default_action = "status" -function status(self) +function mymodule.status(self) return self.model.getstatus() end -function startstop(self) +function mymodule.startstop(self) return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata) end -function details(self) +function mymodule.details(self) return self.model.getstatusdetails() end -function listfiles(self) +function mymodule.listfiles(self) return self.model.getfilelist() end -function expert(self) +function mymodule.expert(self) return self.handle_form(self, self.model.getfiledetails, self.model.updatefiledetails, self.clientdata, "Save", "Edit ClamAV File", "File Saved") end -function logfile(self) +function mymodule.logfile(self) return self.model.getlogfile() end + +return mymodule -- cgit v1.2.3