summaryrefslogtreecommitdiffstats
path: root/freeswitch-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-10-19 23:52:24 +0000
committerTed Trask <ttrask01@yahoo.com>2013-10-19 23:52:24 +0000
commitf047cc93b9c8ef2b81bc692af3a2868969992bdf (patch)
tree735a4e45bbdad5ce3fa93f3f73f58ccf466eac0b /freeswitch-controller.lua
parent6ec8af74ad7e18d815888eb511c09802ffcd2ab4 (diff)
downloadacf-freeswitch-f047cc93b9c8ef2b81bc692af3a2868969992bdf.tar.bz2
acf-freeswitch-f047cc93b9c8ef2b81bc692af3a2868969992bdf.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 'freeswitch-controller.lua')
-rw-r--r--freeswitch-controller.lua20
1 files changed, 11 insertions, 9 deletions
diff --git a/freeswitch-controller.lua b/freeswitch-controller.lua
index 7f9d628..baf1b35 100644
--- a/freeswitch-controller.lua
+++ b/freeswitch-controller.lua
@@ -1,31 +1,33 @@
-module (..., package.seeall)
+local mymodule = {}
-default_action = "status"
+mymodule.default_action = "status"
-status = function( self )
+mymodule.status = function( self )
return self.model.get_status()
end
-startstop = function( self )
+mymodule.startstop = function( self )
return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata)
end
-listfiles = function( self )
+mymodule.listfiles = function( self )
return self.model.list_files()
end
-editfile = function( self )
+mymodule.editfile = function( self )
return self.handle_form(self, self.model.get_file, self.model.update_file, self.clientdata, "Save", "Edit File", "File Saved")
end
-function createfile(self)
+function mymodule.createfile(self)
return self.handle_form(self, self.model.getnewfile, self.model.createfile, self.clientdata, "Create", "Create New Freeswitch File", "Freeswitch File Created")
end
-function deletefile(self)
+function mymodule.deletefile(self)
return self.handle_form(self, self.model.getdeletefile, self.model.deletefile, self.clientdata, "Delete", "Delete Freeswitch File", "Freeswitch File Deleted")
end
-function reloadxml(self)
+function mymodule.reloadxml(self)
return self.handle_form(self, self.model.getreloadxml, self.model.reload_xml, self.clientdata, "Reload", "Reload Freeswitch XML")
end
+
+return mymodule