diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-10-18 20:08:58 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-10-18 20:08:58 +0000 |
commit | 84b63e040c4dd3f55aafc6089b36cbe1066a58f7 (patch) | |
tree | 9451edbd515312521fa0085949b00025e960775d /clamav-controller.lua | |
parent | d63c6695c768b9cf893eb7f0f22a8078b4df3b86 (diff) | |
download | acf-clamav-84b63e040c4dd3f55aafc6089b36cbe1066a58f7.tar.bz2 acf-clamav-84b63e040c4dd3f55aafc6089b36cbe1066a58f7.tar.xz |
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.
Diffstat (limited to 'clamav-controller.lua')
-rw-r--r-- | clamav-controller.lua | 18 |
1 files changed, 10 insertions, 8 deletions
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 |