summaryrefslogtreecommitdiffstats
path: root/amavis-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-10-18 19:47:04 +0000
committerTed Trask <ttrask01@yahoo.com>2013-10-18 19:47:04 +0000
commit08093f7a2d4cee3dac4834d7d24c81c52a4b7ae2 (patch)
tree0d63bd1cb28988a4bda0ccfc8aaf6b93e903c3c1 /amavis-controller.lua
parentb08c9a69a29ff3500fc46fb6cdaddf1eda40c011 (diff)
downloadacf-amavisd-new-08093f7a2d4cee3dac4834d7d24c81c52a4b7ae2.tar.bz2
acf-amavisd-new-08093f7a2d4cee3dac4834d7d24c81c52a4b7ae2.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 'amavis-controller.lua')
-rw-r--r--amavis-controller.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/amavis-controller.lua b/amavis-controller.lua
index 0648aac..d69fcc5 100644
--- a/amavis-controller.lua
+++ b/amavis-controller.lua
@@ -1,15 +1,17 @@
-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 expert(self)
+function mymodule.expert(self)
return self.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit Amavis Config", "Configuration Set")
end
+
+return mymodule