summaryrefslogtreecommitdiffstats
path: root/openntpd-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-10-20 00:39:12 +0000
committerTed Trask <ttrask01@yahoo.com>2013-10-20 00:39:12 +0000
commit34bae88186d493a274569a8a2f510a9ee85ec134 (patch)
tree753aff4eb72e17d1df334ea8557143f915816c2f /openntpd-controller.lua
parent801ff66ed8f97603056698f8e8349dcb716665a3 (diff)
downloadacf-openntpd-34bae88186d493a274569a8a2f510a9ee85ec134.tar.bz2
acf-openntpd-34bae88186d493a274569a8a2f510a9ee85ec134.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 'openntpd-controller.lua')
-rw-r--r--openntpd-controller.lua16
1 files changed, 9 insertions, 7 deletions
diff --git a/openntpd-controller.lua b/openntpd-controller.lua
index dc90eb4..e1b7ca3 100644
--- a/openntpd-controller.lua
+++ b/openntpd-controller.lua
@@ -1,23 +1,25 @@
-module (..., package.seeall)
+local mymodule = {}
-default_action = "status"
+mymodule.default_action = "status"
-function config(self)
+function mymodule.config(self)
return self.handle_form(self, self.model.read_config, self.model.update_config, self.clientdata, "Save", "Edit OpenNTPD Config", "OpenNTPD Configuration Saved")
end
-function status (self)
+function mymodule.status (self)
return self.model.getstatus()
end
-function details (self)
+function mymodule.details (self)
return self.model.getstatusdetails()
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
+
+return mymodule