diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-10-17 19:07:53 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-10-17 19:07:53 +0000 |
commit | 2ece009273252437281c8cc0b84ba2ec49e5d07c (patch) | |
tree | 1c082ee4891a4717f2fea09f0df4a8946d9fdb41 /syslog-controller.lua | |
parent | 0537a242f9709271454252e7897a7709144a3b02 (diff) | |
download | acf-alpine-baselayout-2ece009273252437281c8cc0b84ba2ec49e5d07c.tar.bz2 acf-alpine-baselayout-2ece009273252437281c8cc0b84ba2ec49e5d07c.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 'syslog-controller.lua')
-rw-r--r-- | syslog-controller.lua | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/syslog-controller.lua b/syslog-controller.lua index 3367a55..ec9cb83 100644 --- a/syslog-controller.lua +++ b/syslog-controller.lua @@ -1,23 +1,25 @@ -module(..., package.seeall) +local mymodule = {} -default_action = "loginfo" +mymodule.default_action = "loginfo" -function loginfo(self) +function mymodule.loginfo(self) return self.model.getlogging() end -function config(self) +function mymodule.config(self) return self.handle_form(self, self.model.getconfig, self.model.updateconfig, self.clientdata, "Save", "Edit config", "Configuration Set") end -function expert(self) +function mymodule.expert(self) return self.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit config", "Configuration Set") 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 status(self) +function mymodule.status(self) return self.model.getstatus() end + +return mymodule |