summaryrefslogtreecommitdiffstats
path: root/shorewall-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-10-21 00:32:45 +0000
committerTed Trask <ttrask01@yahoo.com>2013-10-21 00:32:45 +0000
commit64aa23cf7fcbd49b4b52a6731f2c64bd9db1fc29 (patch)
tree9e9cbb7f4631dd8f1039e9fda4260d5dee6bfbb9 /shorewall-controller.lua
parent0e0a8293f75edce4d19dbb170ccaa7ab8c790929 (diff)
downloadacf-shorewall-64aa23cf7fcbd49b4b52a6731f2c64bd9db1fc29.tar.bz2
acf-shorewall-64aa23cf7fcbd49b4b52a6731f2c64bd9db1fc29.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 'shorewall-controller.lua')
-rw-r--r--shorewall-controller.lua22
1 files changed, 12 insertions, 10 deletions
diff --git a/shorewall-controller.lua b/shorewall-controller.lua
index 934e92c..59f6394 100644
--- a/shorewall-controller.lua
+++ b/shorewall-controller.lua
@@ -1,32 +1,32 @@
-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 details(self)
+function mymodule.details(self)
return self.model.getstatusdetails()
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 listfiles(self)
+function mymodule.listfiles(self)
return self.model.getfilelist()
end
-function edit(self)
+function mymodule.edit(self)
return self.handle_form(self, function() return self.model.getfiledetails(self.clientdata.filename) end, self.model.updatefiledetails, self.clientdata, "Save", "Edit File", "File Saved")
end
-function logfile(self)
+function mymodule.logfile(self)
return self.model.getlogfile()
end
--[[
-function editrecords(self,types,record,errormessage)
+function mymodule.editrecords(self,types,record,errormessage)
local recorddetails = {}
local edit = {}
local config=self.model:getconfig()
@@ -447,7 +447,7 @@ function editrecords(self,types,record,errormessage)
}
end
-function config(self)
+function mymodule.config(self)
-- If we made some changes to a recods... then proceed with the modification
local savesuccess, configmessage
@@ -615,3 +615,5 @@ function config(self)
}
end
--]]
+
+return mymodule